C Programming Multiple Choice Questions (MCQ) | IT Developer <?php echo $page_title; ?>
IT Developer

Java Programming Multiple Choice Questions (MCQ)

Introduction to Java - Multiple Choice Questions (MCQ) - Set 25



Share with a Friend

Multiple Choice Questions


Java - Introduction to Java - Multiple Choice Questions (MCQ) - Set 25

121. What is the extension of compiled java classes?
A). .class
B). .java
C). .txt
D). .js
View Answer
Correct: A




122. What is the range of short data type in Java?
A). -128 to 127
B). -32768 to 32767
C). -2147483648 to 2147483647
D). None of the mentioned
View Answer
Correct: B




123. What is the range of byte data type in Java?
A). -128 to 127
B). -32768 to 32767
C). -2147483648 to 2147483647
D). None of the mentioned
View Answer
Correct: A




124. Which of the following are legal lines of Java code?
   1. int w = (int)888.8;
   2. byte x = (byte)100L;
   3. long y = (byte)100;
   4. byte z = (byte)100L;
 
A). 1 and 2
B). 2 and 3
C). 3 and 4
D). All statements are correct
View Answer
Correct: D




125. An expression involving byte, int, and literal numbers is promoted to which of these?
A). int
B). long
C). byte
D). float
View Answer
Correct: A