Chapter 1 Check Point Questions
Section 1.2
▼1.2.1
What are hardware and software?
▼1.2.2
List five major hardware components of a computer.
▼1.2.3
What does the acronym CPU stand for?
What unit is used to measure CPU speed?
▼1.2.4
What is a bit? What is a byte?
▼1.2.5
What is memory for? What does RAM stand for? Why is memory called RAM?
▼1.2.6
What unit is used to measure memory size?
What unit is used to measure disk size?
▼1.2.7
What is the primary difference between memory and a storage device?
Section 1.3
▼1.3.1
What language does the CPU understand?
▼1.3.2
What is an assembly language? What is an assembler?
▼1.3.3
What is a high-level programming language? What is a source program?
▼1.3.4
What is an interpreter? What is a compiler?
▼1.3.5
What is the difference between an interpreted language and a compiled language?
Section 1.4
▼1.4.1
What is an operating system? List some popular operating systems.
▼1.4.2
What are the major responsibilities of an operating system?
▼1.4.3
What are multiprogramming, multithreading, and multiprocessing?
Section 1.5
▼1.5.1
Who invented Java? Which company owns Java now?
▼1.5.2
What is a Java applet?
▼1.5.3
What programming language does Android use?
Section 1.6
▼1.6.1
What is the Java language specification?
▼1.6.2
What does JDK stand for? What does JRE stand for?
▼1.6.3
What does IDE stand for?
▼1.6.4
Are tools like NetBeans and Eclipse different languages from Java, or are they dialects or extensions of Java?
Section 1.7
▼1.7.1
What is a keyword? List some Java keywords.
▼1.7.2
Is Java case sensitive? What is the case for Java keywords?
▼1.7.3
What is a comment? Is the comment ignored by the compiler? How do you denote a comment line and a comment paragraph?
▼1.7.4
What is the statement to display a string on the console?
▼1.7.5
Show the output of the following code:
public class Test { public static void main(String[] args) { System.out.println("3.5 * 4 / 2 - 2.5 is "); System.out.println(3.5 * 4 / 2 - 2.5); } }
Section 1.8
▼1.8.1
What is the Java source filename extension, and what is the Java bytecode filename extension?
▼1.8.2
What are the input and output of a Java compiler?
▼1.8.3
What is the command to compile a Java program?
▼1.8.4
What is the command to run a Java program?
▼1.8.5
What is the JVM?
▼1.8.6
Can Java run on any machine? What is needed to run Java on a computer?
▼1.8.7
If a NoClassDefFoundError occurs when you run a program, what is the cause of the error?
▼1.8.8
If a NoSuchMethodError occurs when you run a program, what is the cause of the error?
Section 1.9
▼1.9.1
Reformat the following program according to the programming style and documentation guidelines. Use the end-of-line brace style.
public class Test { // Main method public static void main(String[] args) { /** Display output */ System.out.println("Welcome to Java"); } }
Section 1.10
▼1.10.1
What are syntax errors (compile errors), runtime errors, and logic errors?
▼1.10.2
Give examples of syntax errors, runtime errors, and logic errors.
▼1.10.3
If you forget to put a closing quotation mark on a string, what kind error will be raised?
▼1.10.4
If your program needs to read integers, but the user entered strings, an error would occur when running this program. What kind of error is this?
▼1.10.5
Suppose you write a program for computing the perimeter of a rectangle and you mistakenly write your program so that it computes the area of a rectangle. What kind of error is this?
▼1.10.6
Identify and fix the errors in the following code:
1 public class Welcome { 2 public void Main(String[] args) { 3 System.out.println('Welcome to Java!'); 4 } 5 )