Which of the following data type stores longest floating-point value?
boolean
double
float
long
View Answer
Correct Answer: B — double
Explanation:
'double' is the longest data type with 64-bit defined by Java to store floating-point values.
10 practice sets · Page 1 of 1
Which of the following data type stores longest floating-point value?
boolean
double
float
long
Correct Answer: B — double
Explanation:
'double' is the longest data type with 64-bit defined by Java to store floating-point values.
Which of the following data type is used to create a number for counting or indexing arrays?
byte
long
int
float
Correct Answer: C — int
Explanation:
No explanation is available for this question yet.
Which of the following keyword is used to declare Byte data type?
Byte[]
BYTE
BYTES
byte
Correct Answer: D — byte
Explanation:
No explanation is available for this question yet.
Which of the following is smallest integer data type?
short
long
byte
double
Correct Answer: C — byte
Explanation:
'byte' is signed 8-bit smallest integer data type that has range from -128 to 127.
Which of following cannot be stored in character data type?
Special symbols
String
Letter
Digit
Correct Answer: B — String
Explanation:
String is a collection of characters and is stored in a variable of string data type.
Which of the following is not a primitive data type?
enum
short
byte
char
Correct Answer: A — enum
Explanation:
An 'enum' data type is special data type that enables a variable to store set of predefined constants.
Which of the following data types comes under 'Floating' data type?
float
byte
double
a and c
Correct Answer: D — a and c
Explanation:
Only 'float' and 'double' belong to floating-point numbers. 'byte' comes under 'Integer' data type.
Which of the following data types comes under 'Integer' data type?
short
long
int
all of the mentioned
Correct Answer: D — all of the mentioned
Explanation:
No explanation is available for this question yet.
How many Primitive data types are there in Java?
4
2
8
7
Correct Answer: C — 8
Explanation:
Java defines eight simple types of data which are put in four groups. They are integers, floating-point numbers, boolean, characters.
Which of the following data types are available in Java?
Primitive Datatypes
Reference Datatypes
Both
None of the mentioned
Correct Answer: B — Reference Datatypes
Explanation:
Primitive Datatypes are defined by Java. Reference Datatypes are user defined, created using defined constructors of class.