English

Write the output of the following. char c1 = Character.toLowerCase('Q'); System.out.println(c1);

Advertisements
Advertisements

Question

Write the output of the following.

char c1 = Character.toLowerCase('Q');

System.out.println(c1);

Very Short Answer
Advertisements

Solution

q

Explanation:

The method Character.toLowerCase('Q') converts the provided uppercase character into its lowercase equivalent. Because the input is a capital 'Q', the method transforms it into a lowercase 'q', which is then stored in the variable c1 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. (iv) | Page 135
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×