ICSE Class 10 Computer Applications
Question 10 of 36
String Handling — Question 11
Back to all questions 11
Question Question 11
What will be the output for the following program segment?
String s = new String ("abc");
System.out.println(s.toUpperCase( ));Output
ABC
Explanation
String s stores "abc".
toUpperCase( ) method converts all of the characters in the String to upper case. Thus, "abc" is converted to "ABC" and printed on the output screen.