English

Write the output of the following. char c2 = Character.toUpperCase('i'); System.out.println(c2);

Advertisements
Advertisements

Question

Write the output of the following.

char c2 = Character.toUpperCase('i');

System.out.println(c2);

Very Short Answer
Advertisements

Solution

I

Explanation:

The method Character.toUpperCase('i') converts the provided lowercase character into its uppercase equivalent. Because the input is a lowercase 'i', the method transforms it into a capital 'I', which is then stored in the variable c2 and printed

shaalaa.com
  Is there an error in this question or solution?
Chapter 5: Library Classes - Exercises [Page 135]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 5 Library Classes
Exercises | Q 5. (v) | Page 135
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×