Java-Certified-Programmer-(1Z0-501).pdf - Oracle 1Z0-501...

This preview shows page 1 - 4 out of 7 pages.

1Z0-501 Oracle Java Certified Programmer
Answer: F QUESTION: 137 Which can be used to decode charS for output? A. Java.io.InputStream. B. Java.io.EncodedReader. C. Java.io.InputStreamReader. D. Java.io.InputStreamWriter. E. Java.io.BufferedInputStream. Answer: C QUESTION: 138 Given: 1. public class Test { 2. public static void main (String [] args) { 3. string foo = "blue"; 4. string bar = foo; 5. foo = "green"; 6. System.out.printIn(bar); 7. } 8. } What is the result? A. An exception is thrown. B. The code will not compile. C. The program prints "null" D. The program prints "blue" E. The program prints "green" Answer: D QUESTION: 139 Which code determines the int value foo closest to a double value bar? 63
A. Int foo = (int) Math.max(bar); B. Int foo = (int) Math.min(bar); C. Int foo = (int) Math.abs(bar); D. Int foo = (int) Math.ceil(bar); E. Int foo = (int) Math.floor(bar); F. Int foo = (int) Math.round(bar); Answer: F QUESTION: 140 Which two demonstrate encapsulation of data? (Choose Two) A. Member data have no access modifiers.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture