A) System.out.println( "hellois fun\rJava " ) ;
B) System.out.println( 'Java is fun' ) ;
C) System.out.println( "\"Java is fun\"" ) ;
D) System.out.println( Java is fun ) ;
Correct Answer
verified
Multiple Choice
A) System.out.printf( "%2s", "Hello " "World" ) ;
B) System.out.printf( "%s %s", "Hello", "World" ) ;
C) System.out.printf( "%s%s", "Hello, World" ) ;
D) System.out.printf( "s% s%", "Hello", "World" ) ;
Correct Answer
verified
Multiple Choice
A) a < b c != d
B) a < b d <= c
C != d
C) a > b c != d
D) a < b c < d
A != b
Correct Answer
verified
Multiple Choice
A) int total;
B) import java.util.Scanner;
C) public static void main( String args[] )
D) // first string entered by user
Correct Answer
verified
Multiple Choice
A) public.java.
B) public.class.java.
C) Addition.java.
D) addition.java.
Correct Answer
verified
Multiple Choice
A) system.out.println( 'Hello world!' ) :
B) System. out.println( "Hello world!" ) ;
C) System.out. println( "Hello world!" ) ;
D) System.out.println( Hello world! ) ;
Correct Answer
verified
Multiple Choice
A) System.out.print("Enter your age: ") ; prompts the user to take action.
B) Class names typically begin with a capital letter.
C) Package java.lang is imported in every Java program.
D) All of the above are true.
Correct Answer
verified
Multiple Choice
A) Primitive types are keywords.
B) Primitive types must appear in all lowercase letters.
C) Real numbers contain decimal points.
D) Variable name identifiers must begin with a lowercase letter.
Correct Answer
verified
Multiple Choice
A) +
B) -
C) .
D) %
Correct Answer
verified
Multiple Choice
A) cd Welcome.java
B) javac Welcome.java
C) java Welcome.java
D) compile Welcome.java
Correct Answer
verified
Multiple Choice
A) printf.
B) import declaration.
C) Scanner.
D) main.
Correct Answer
verified
Multiple Choice
A) colons (:) .
B) semicolons (;) .
C) commas (,) .
D) periods (.) .
Correct Answer
verified
Multiple Choice
A) variables.
B) constants.
C) expressions.
D) None of the above.
Correct Answer
verified
Multiple Choice
A) comments.
B) messages.
C) integers.
D) variables.
Correct Answer
verified
Multiple Choice
A) Two forward slashes ( // ) .
B) Three forward slashes ( /// ) .
C) A slash and a star ( /* ) .
D) A slash and two stars ( /** ) .
Correct Answer
verified
Multiple Choice
A) Hello World.
B) helloWorld
C) Hello World
D) World hello
Correct Answer
verified
Multiple Choice
A) java welcome
B) java Welcome.class
C) java Welcome
D) run Welcome.class
Correct Answer
verified
Multiple Choice
A) Neglecting to initialize a local variable in a method before it is used.
B) Placing a semicolon at the end of the first line of an if statement.
C) Omitting the left and right parenthesis for the condition of an if statement.
D) All are compilation errors.
Correct Answer
verified
Multiple Choice
A) inside the class declaration's body.
B) before the class declaration.
C) after the class declaration.
D) all of the above will work.
Correct Answer
verified
Multiple Choice
A) char
B) byte
C) real
D) double
Correct Answer
verified
Showing 1 - 20 of 34
Related Exams