Menu
Question Index
...

What will be the output of the following program?

public class Conversion {
    public static void main(String[] args) {
        int i = 20;
        System.out.println(Integer.toBinaryString(i) + ", " + Integer.toOctalString(i) + ", " + Integer.toHexString(i));
    }
}


10100, 22, AA
10100, 24, 14
Compilation Error
Runtime Error

Doubts

Problems

Topic: Converting Numbers to and from Strings In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App