mercoledì 16 aprile 2014

Java 7 OCA 1z0-803: What is the result?

Given the following:
class Y {
 public static void main(String[] args) {
  int a[] = { 1, 2, 3, 4 }; // Line 3
  System.out.print(a instanceof Object); // Line 4
 }
}
What is the result?
A - Compilation fails due to error at line 3.
B - Compilation fails due to error at line 4.
C - Will produce output as false.
D - Will produce output as true.
E - Length of this array is 3.
Answer: D
More questions about Java 7 OCA 1z0-803?