Which statement will empty the contents of a StringBuilder variable named sb?
Correct Answer:
C
Given the code fragment:
What is the result?
Correct Answer:
A
Given this segment of code:
Which two statements, if either were true, would make the code compile? (Choose two.)
Correct Answer:
BC
Which statement is true about Java byte code?
Correct Answer:
D
Java bytecodes help make "write once, run anywhere" possible. You can compile your program into bytecodes on any platform that has a Java compiler. The bytecodes can then be run on any implementation of the Java VM. That means that as long as a computer has a Java VM, the same program written in the Java programming language can run on Windows 2000, a Solaris workstation, or on an iMac.
Given:
What is the result?
Correct Answer:
E