Want to pass your Java SE 8 Programmer I 1Z0-808 exam in the very first attempt? Try Pass2lead! It is equally effective for both starters and IT professionals.
VCE
Which two actions will improve the encapsulation of a class?
A. Changing the access modifier of a field from public to private
B. Removing the public modifier from a class declaration
C. Changing the return type of a method to void
D. Returning a copy of the contents of an array or ArrayList instead of a direct reference
Given:
public class MyClass {
public static void main(String[] args) {
while (int ii = 0; ii < 2) {
ii++;
System.out.println("ii = " + ii);
}
}
}
What is the result?
A. ii = 1 ii = 2
B. Compilation fails
C. The program prints nothing
D. The program goes into an infinite loop with no output
E. The program goes to an infinite loop outputting: ii = 1 ii = 1
Given the code fragment:

What is the result?
A. 2012-02-10
B. 2012-01-30
C. 2012-02-10 00:00
D. A DateTimeException is thrown at runtime.