Single Choice Not Set

QGuess the output of the following program -
public class NumberSystem{
    public static void main(String[] args){

        int val = 0b11010;
        System.out.println("Value : " + val);

    }
}

ID: #2085 Java Data Types and Variables - MCQ 3,960 views
Question Info
#2085Q ID
Not SetDifficulty
Java Data Types and Variables - MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 32
  • B 26
  • C 28
  • D 64
Correct Answer

Explanation

Its binary representation of 26. Binary Literal is accepted in latest JDK 7.

Share This Question

Challenge a friend or share with your study group.