1.
What is the range of an int data type in Java?
A. 
B. 
C. 
D. 
2.
What is the meaning of variable++ ?
A. 
B. 
Add one to the variable after its current value has been used.
C. 
Add one to the variable before using its value.
D. 
Double the value in the variable.
3.
Consider the following line of Java code. int x = 1+7*2;
What will be the value of x at the end of execution of the line of code?
A. 
B. 
C. 
D. 
4.
The Java expression: !((b != 0) || (c <= 5)) is equivalent to:
A. 
B. 
C. 
D. 
5.
What does the following program output to the monitor:
int value = 0, count = 1;
value = count++ ;
System.out.println("value: "+ value + “count: " + count );
A. 
B. 
C. 
D. 
6.
What is the output of the following:
int a = 0, b = 10;
a = --b ;
System.out.println("a= " + a + " b= " + b );
A. 
B. 
C. 
D. 
7.
Which of the answers does the same thing as the following: value += sum++ ;
A. 
Value = value + sum;
sum = sum + 1;
B. 
Sum = sum + 1;
value = value + sum;
C. 
D. 
8.
What is the name for an application that changes a human-readable programming language into a machine-readable language?
A. 
B. 
C. 
D. 
9.
What kind of programming language is Java?
A. 
An object-oriented programming language
B. 
An array programming language
C. 
A logic programming language
D. 
A database programming language
10.
What is the result of evaluating the following expression? (1/2 + 3.5) * 2.0
A. 
B. 
C. 
D. 
11.
The && operator works with which data types?
A. 
B. 
C. 
D. 
12.
Which one of the following is NOT a correct variable name?
A. 
B. 
C. 
D. 
13.
Does every Java variable use a data type?
A. 
No---only numeric variables use data types.
B. 
No---data types are optional.
C. 
Yes---all variables are of the same data type.
D. 
Yes---each variable must be declared along with its data type.
14.
When you compile a Java program, what are you doing?
A. 
B. 
Converting it into a form the computer can better understand
C. 
Adding it to your program collection
D. 
Converting it to object file
15.
What is a variable?
A. 
Something that wobbles but doesn't fall down.
B. 
Text in a program that the compiler ignores.
C. 
A place to store information in a program.
D. 
An expression use in Java programming.
16.
What is the process of fixing errors called?
A. 
B. 
C. 
D. 
17.
What do you call a group of statements contained with an opening bracket and a closing bracket?
A. 
B. 
C. 
D. 
18.
What is the output of the following program fragment?
for ( int j = 0; j < 5; j++ ) {
System.out.print( j + " " );
}
System.out.println( );
A. 
B. 
C. 
D. 
19.
What is the output of the following code fragment?
for ( int j = 10; j > 5; j-- ) {
System.out.print( j + " " );
} System.out.println( );
A. 
B. 
C. 
D. 
20.
What must the test be so that the following fragment prints out the integers from 5 through 15?
for ( int j = 5; ________ ; j++ ){
System.out.print( j + " " );
}System.out.println( );
A. 
B. 
C. 
D. 
21.
What must the change be so that the following fragment prints out the even integers 0 2 4 6 8 10?
for ( int j = 0; j <= 10; _______ )
System.out.print( j + " " );
System.out.println( );
A. 
B. 
C. 
D. 
22.
What must the initialization be so that the following fragment prints out the integers -3 -2 -1 ?
for ( _______; j < 0; j++ )
System.out.print( j + " " );
System.out.println( );
A. 
B. 
C. 
D. 
23.
What is the output of the following code fragment?
for ( int j = 5; j > -5; j-- )
System.out.print( j + " " );
System.out.println( );
A. 
B. 
C. 
5 4 3 2 1 0 -1 -2 -3 -4 -5
D. 
24.
What is the output of the following code fragment?
int count = 0;
for ( ; count < 9; ++count )
System.out.print( count + " " );
A. 
B. 
Nothing --- the program will not compile.
C. 
D. 
25.
What does this code print on the monitor?
int count = 7;
while ( count >= 4 ) {
System.out.print( count + " " ); count = count - 1;
} System.out.println( );
A. 
B. 
C. 
D.