Output Questions for Class 10 ICSE Computer Applications
Predict the output of the following Java program snippet:
String str = "Computer Applications" + 1 + 0;
System.out.println("Understanding" + str);
Java
Java String Handling
72 Likes
Answer
UnderstandingComputer Applications10
Working
In the first line, +
operator concatenates 1 and 0 to the end of "Computer Applications" so str
becomes "Computer Applications10". Next line prints "UnderstandingComputer Applications10" to the console.
Answered By
39 Likes