Menu
Question Index
...

What will be the output of the following program?

public class House {
    public static void main(String args[]) {
        char fan[] = {'A', 'b', 1};
        for (char element : fan) {
            if (Character.isLetter(element))
                System.out.print(element);
            if (Character.isUpperCase(element))
                System.out.print(element);
            if (Character.isLowerCase(element))
                System.out.print(element);
            if (Character.isDigit(element))
                System.out.print(element);
        }
    }
}


AAbb
Ab1
AAbb1
Compilation Error or 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