Single Choice
Not Set
QGuess the output of the following program -
public class NumberSystem{
public static void main(String[] args){
int hexVal = 0x1a;
System.out.println("Value : " + hexVal);
}
}
ID: #2084
Java Data Types and Variables - MCQ
6,887 views
Question Info
#2084Q ID
Not SetDifficulty
Java Data Types and Variables - MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
0x1a = 0001 1010
= 2^1 + 2^3 + 2^4
= 2 + 8 + 16
= 26
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic