Java MCQ – Multiple Choice Questions and Answers – Data Types and Variables – Part 1
This collection of Java Multiple Choice Questions and Answers (MCQs): Quizzes & Practice Tests with Answer focuses on “Java data types and variables”.
1. Java is a _________ language.
A dynamically typed
B weakly typed
C strongly typed
D medium typed
2. How many primitive data types are there in Java programming?
A 2
B 3
C 5
D 8
3. Size of int in java is ______
A 16 bit
B 32 bit
C 64 bit
D Relies on the execution environment
4. Which is the smallest integer data type?
A int
B byte
C short
D long
5. The smaller integer type is _______ and its size is __ bits.
A byte, 8
B byte, 1
C short, 8
D int, 4
6. Which is not a primitive data type in Java ?
A float
B enum
C double
D int
7. Integer Data type doesn’t incorporate following primitive data type ______.
A short
B byte
C long
D double
8. Which data types go through floating data types ?
A int
B byte
C long
D double
9. Character data type can’t store _______ value.
A Special Character
B Digit
C String
D Letter
10. What is the size of integer in Java?
A 1 Bytes
B 2 Bytes
C 4 Bytes
D 8 Bytes