Chapter 1 Introduction to
Computers, Programs, and Java
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rig
hts reserved. 0132130807 1
, Objectives
To review computer basics, programs, and operating
systems (§§1.2-1.4).
To explore the relationship between Java and the World
Wide Web (§1.5).
To distinguish the terms API, IDE, and JDK (§1.6).
To write a simple Java program (§1.7).
To display output on the console (§1.7).
To explain the basic syntax of a Java program (§1.7).
To create, compile, and run Java programs (§1.8).
(GUI) To display output using the JOptionPane output
dialog boxes (§1.9).
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rig
hts reserved. 0132130807 2
, What is a Computer?
A computer consists of a CPU, memory, hard disk, floppy disk,
monitor, printer, and communication devices.
Bus
Storage Communication Input Output
Memory CPU Devices Devices Devices
Devices
e.g., Disk, CD, e.g., Modem, e.g., Keyboard, e.g., Monitor,
and Tape and NIC Mouse Printer
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rig
hts reserved. 0132130807 3
, CPU
The central processing unit (CPU) is the brain of a computer. It
retrieves instructions from memory and executes them. The CPU
speed is measured in megahertz (MHz), with 1 megahertz equaling 1
million pulses per second. The speed of the CPU has been improved
continuously. If you buy a PC now, you can get an Intel Pentium 4
Processor at 3 gigahertz (1 gigahertz is 1000 megahertz).
Bus
Storage Communication Input Output
Memory CPU Devices Devices Devices
Devices
e.g., Disk, CD, e.g., Modem, e.g., Keyboard, e.g., Monitor,
and Tape and NIC Mouse Printer
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rig
hts reserved. 0132130807 4
Computers, Programs, and Java
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rig
hts reserved. 0132130807 1
, Objectives
To review computer basics, programs, and operating
systems (§§1.2-1.4).
To explore the relationship between Java and the World
Wide Web (§1.5).
To distinguish the terms API, IDE, and JDK (§1.6).
To write a simple Java program (§1.7).
To display output on the console (§1.7).
To explain the basic syntax of a Java program (§1.7).
To create, compile, and run Java programs (§1.8).
(GUI) To display output using the JOptionPane output
dialog boxes (§1.9).
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rig
hts reserved. 0132130807 2
, What is a Computer?
A computer consists of a CPU, memory, hard disk, floppy disk,
monitor, printer, and communication devices.
Bus
Storage Communication Input Output
Memory CPU Devices Devices Devices
Devices
e.g., Disk, CD, e.g., Modem, e.g., Keyboard, e.g., Monitor,
and Tape and NIC Mouse Printer
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rig
hts reserved. 0132130807 3
, CPU
The central processing unit (CPU) is the brain of a computer. It
retrieves instructions from memory and executes them. The CPU
speed is measured in megahertz (MHz), with 1 megahertz equaling 1
million pulses per second. The speed of the CPU has been improved
continuously. If you buy a PC now, you can get an Intel Pentium 4
Processor at 3 gigahertz (1 gigahertz is 1000 megahertz).
Bus
Storage Communication Input Output
Memory CPU Devices Devices Devices
Devices
e.g., Disk, CD, e.g., Modem, e.g., Keyboard, e.g., Monitor,
and Tape and NIC Mouse Printer
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rig
hts reserved. 0132130807 4