Question 61

Given:
import java.util.*;
public class Ref {
public static void main(String[] args) {
StringBuilder s1 = new StringBuilder("Hello Java!");
String s2 = s1.toString();
List<String> lst = new ArrayList<String>();
lst.add(s2);
System.out.println(s1.getClass());
System.out.println(s2.getClass());
System.out.println(lst.getClass());
}
}
What is the result?
  • Question 62

    Given the following array:

    Which two code fragments, independently, print each element in this array? (Choose two.) A:

    B:

    C:

    D:

    E:

    F:
  • Question 63

    Given:

    What is the result?
  • Question 64

    Given the code fragment:

    Which option can replace xxx to enable the code to print 135?
  • Question 65

    Which three statements describe the object-oriented features of the Java language?