Java Primitive Data Types MCQ Questions and Answers 1

Study and learn Java MCQ questions and answers on Primitive data types like byte, short, char, int, long, float, double and boolean. Attend job interviews easily with these MCQs.

Go through Java Basic Theory Notes on Data Types before studying these questions.



1) What does a Data Type in Java refers to?
A) The place where data is stored
B) The technique how data is retreived
C) The type or variety of data being handled for reading and writing
D) None of the above
Answer [=]
Answer[=]
2) Choose the wrong statement about Java programming?
A) Java supports unsigned integers
B) Java supports signed integers
C) Java supports signed char
D) None of the above
Answer [=]
Answer[=]
3) Which data type among the following is an implementation of Objects or OOPs?
A) byte
B) int
C) char
D) None of the above
Answer [=]
Answer[=]
4) What is a Primitive Data Type in Java?
A) Data type, which is implemented in an Object-oriented way.
B) Data Type which is implemented in a machine-dependent way
C) Data Type which is implemented in a non-object oriented way.
D) None of the above
Answer [=]
Answer[=]
5) which among the following is not a Data Type in Java?
A) short
B) int
C) long double
D) double
Answer [=]
Answer[=]
6) Which among the following is not a valid Data Type in Java?
A) long
B) bool
C) double
D) float
Answer [=]
Answer[=]
7) Which is the data type used mostly to handle streams and buffers in Java language?
A) short
B) int
C) byte
D) float
Answer [=]
Answer[=]


 

8) Which is the data type that is not recommended for numeric applications in Java?
A) byte
B) float
C) int
D) long
Answer [=]
Answer[=]
9) Choose the number range for byte data type in Java?
A) -127 to +128
B) -128 to +127
C) 0 to 256
D) 0 to 255
Answer [=]
Answer[=]
10) What is the size of a SHORT integer in Java?
A) 1 byte
B) 2 bytes
C) 4 bytes
D) 8 bytes
Answer [=]
Answer[=]
11) What is the size of an INT integer in Java?
A) 2 bytes
B) 4 bytes
C) 6 bytes
D) 8 bytes
Answer [=]
Answer[=]
12) What is the size of a LONG integer in Java?
A) 2 bytes
B) 4 bytes
C) 8 bytes
D) 16 bytes
Answer [=]
Answer[=]
13) What is the size of a FLOAT floating point number in Java?
A) 2 bytes
B) 4 bytes
C) 6 bytes
D) 8 bytes
Answer [=]
Answer[=]
14) What is the size of a DOUBLE floating point number in Java?
A) 4 bytes
B) 6 bytes
C) 8 bytes
D) 16 bytes
Answer [=]
Answer[=]


 

15) What is the size of a CHAR data type constant in Java?
A) 1 byte
B) 2 bytes
C) 4 bytes
D) 6 bytes
Answer [=]
Answer[=]
16) What is the size of a boolean data type constant in Java?
A) 1 bit
B) 4 bits
C) 8 bits
D) Not documented well
Answer [=]
Answer[=]
17) What is the IEEE standard adopted to represent Floating point numbers in Java?
A) IEEE 9000
B) IEEE 800
C) IEEE 754
D) IEEE 512
Answer [=]
Answer[=]
18) What is the character encoding standard used in Java language?
A) ASCII
B) Unicode
C) Hexacode
D) Bytecode
Answer [=]
Answer[=]
19) What is the abbreviation of ASCII?
A) American Standard Characters for Information Interchange
B) Australian Standard Code for Information Interchange
C) American Standard Code for Information Interchange
D) None of the above
Answer [=]
Answer[=]
20) Choose the right statement about Java Data types.
A) Integer data types are short, int and long
B) Real number data types are float and double
C) The character data type is char.
D) All the above
Answer [=]
Answer[=]


Like or Share

Show some care. Like or Subscribe. [FB]...[Youtube]

C MCQ App by ExamTray 

Android APP

Java MCQ App by ExamTray 

Android APP
ALL MCQ App by ExamTray Android APP

Ad

 

Try Some Java Books

Book Price
1. Java - The Complete Reference  Check Price
2. Core Java: An Integrated Approach, Black Book Check Price
3. Java All-in-One for Dummies Check Price
4. OCP Java SE 8: Programmer II Check Price
5. Programming with Java Check Price
6. Head First Java Check Price

We may get some affiliate commission for the above purchases.