Menu
Question Index
...

What will be the output of the following program?

public class Lower {
    public static void main(String args[]) {
        char[] high = {'A', 'B', 'c', 'D', 49};
        char l1 = Character.toLowerCase(high[0]);
        char l2 = Character.toLowerCase(high[1]);
        char l3 = Character.toLowerCase(high[2]);
        char l4 = Character.toLowerCase(high[3]);
        char l5 = Character.toLowerCase(high[4]);
        System.out.print(l1 + ", " + l2 + ", " + l3 + ", " + l4 + ", " + l5);
    }
}


a, b, c, d, 49
a, b, c, d, 1
Some other output
Compilation Error
Runtime Error

Doubts

Problems

Topic: Java Character Class

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App