Which code fragment prints Hello world?
A.
sb.insert(0,"Hello ");
System.out.println(sb);
B.
sb.append(0,"Hello ");
System.out.println(sb);
C.
sb.add(0,"Hello ");
System.out.println(sb);
D.
sb.set(0,...
What is the result?
A. [green, red, yellow, cyan]
B. [green, blue, yellow, cyan]
C. [green, red, cyan, yellow]
D. Am IndexOutOfBoundsException is thrown at runtime
Which modification enables the code fragment to print TrueDone?
A. Replace line 5 With String result = "true";
Replace line 7 with case "true":
B. Replace line 5 with boolean opt = l;
Replace line 7 ...
Which statement is true?
A. After line 8, three objects are eligible for garbage collection
B. After line 8, two objects are eligible for garbage collection
C. After line 8, one object is eligible fo...