What is the output?

Given:
public class TestString1 {
public static void main(String[] args) {
String str = "420"; str += 42;
System.out.print(str);
}
}
What is the output?
A. 42
B. 420
C. 462
D. 42042
E. Compilation fails.
F. An exception is thrown at runtime.

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.