APCS - Java - Unit 1

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which of the following is a program that manages and coordinates a computer's components and activities? Select one: A. An operating system B. A language interpreter C. Random access memory D. A compiler E. A device manager

The correct answer is A: An operating system

Which of the following is a portable storage component? Select one: A. Flash drive B. Video display C. Mouse D. Printer E. Game controller

The correct answer is A: Flash drive

What is the output of the following statements? System.out.print( "Hello " ); System.out.println( "World" ); Select one: A. Hello World B. "Hello World" C. "Hello " "World" D. HelloWorld E. None of the above

The correct answer is A: Hello World

Which of the following does not have a syntax error? Select one: A. System.out.println( "Hello world!" ); B. System.out.println( 'Hello world!' ); C. System.out.println( Hello world! ); D. None of the above E. System.out.println( "Hello world!' );

The correct answer is A: System.out.println( "Hello world!" );

Which of the following ends a documentation comment? Select one: A. //* B. */ C. **/ D. *// E. **//

The correct answer is B: */

Which of the following statements is true? I. The escape sequence \b results in a backspace when printed. II. The escape sequence \r results in a new line when printed. III. The escape sequence \c results in a carriage return when printed. Select one: A. II only B. I only C. I, II, and III D. I and II only E. III only F. I and III only

The correct answer is B: I only

When the method printf() requires multiple arguments, the arguments are separated with __________. Select one: A. plus signs ( + ) B. commas ( , ) C. colons ( : ) D. semicolons ( ; ) E. percent signs (%)

The correct answer is B: commas ( , )

Which command executes the Java class file Welcome.class from the command line? Select one: A. javac Welcome.class B. java Welcome.class C. run Welcome.class D. java Welcome E. run Welcome

The correct answer is D: java Welcome

Which of the following types of errors will result in a program failing to compile? Select one: A. Runtime error B. Exception error C. Logic error D. All of the above E. Syntax error

The correct answer is E: Syntax error

Which command compiles the Java source code file Welcome.java? Select one: A. java Welcome.java B. javac Welcome C. compile Welcome.java D. cd Welcome.java E. javac Welcome.java

The correct answer is: javac Welcome.java


Conjuntos de estudio relacionados

Chapter 16 Anti-Inflammatory, Antiarthritis, and Related Agents PrepU

View Set

Chapter 36: Introduction to the Nervous System

View Set

Samuel Gompers: In His Own Words-ush u3 activity

View Set

Unit 4 Vocabulary Personal Finance

View Set

Chapter 28- Hematologic Function

View Set