Question 101

Which three are valid replacements for foo so that the program will compiled and run?
public class ForTest {
public static void main(String[] args) {
int[] arrar = {1,2,3};
for ( foo ) {
}
}
}
  • Question 102

    Given the for loop construct:
    for ( expr1 ; expr2 ; expr3 ) {
    statement;
    }
    Which two statements are true?
  • Question 103

    Given:

    Which code, when inserted at one or more marked positions, would allow classes B and C to compile?
  • Question 104

    Given:

    What is the type of the local variable x?