Menu
Question Index
...

What will be the output of the following program?

public class Flowers {
    public static void main(String[] args) {
        char ro = '5';
        char li = 'b';
        int red = Character.digit(ro, 2);
        int white = Character.digit(li, 36);
        System.out.print(red + ", " + white);
    }
}


5, 98
-1, 11
1, 36
-1, 98
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