Java Data Types MCQs | Java MCQ

In this page provide you software multiple choice question which help to many exam like Semester exam, Gate Exam, Railway , ISRO etc.

Java Basic MCQs | Java Multiple Choose Question with answer

Java Data Types MCQ SET-1

 

Q.1 Which of the following not primitive data type





ANSWER= (A) Array

 

Q.2 How many primitive data types in JAVA





ANSWER= (B) 8

 

Q.3 The size of byte in java





ANSWER= (A) 8 bit

 

Q.4 The default value of byte data type in java ?





ANSWER= (A) 0

 

Q.5 The default value of Float data type in java ?





ANSWER= (B) 0.0f

 

Q.6 The size of Double data type in java ?





ANSWER= (C) 8 byte

 

Q.7 What is output of this code

Class test {

public static void main(string args[]) {

int a=5;

double d=a;

System.out.println(d);
}
}





ANSWER= (B) 5.0

 

Q.8 The size of int data type in java





ANSWER= (A) 4 byte

 

Q.9 What is the return type of constructor ?





ANSWER= (C) No return type

 

Q.10 What is the rabge of byte data type





ANSWER= (A) -128 to 127

 

Q.11 What is the size of long data type ?





ANSWER= (A) 8 byte

 

Q.12 The default value of long data type in java





ANSWER= (A) 0

 

Q.13 Default value of variable having boolean data type is





ANSWER= (B) FALSE

 

Q.14 Correct order of implicit conversion





ANSWER= (A) double , long, int, short, byte

 

Q.15 Correct order of explicit conversion





ANSWER= (C) byte , short , int, long, double

 

Q.16 which among the following is not a Data Type in Java ?





ANSWER= (C) long double

 

Q.17 What is the size of a CHAR data type constant in Java?





ANSWER= (B) 2 bytes

 

Q.18 What is the Range of a CHAR data type constant in Java?





ANSWER= (A) 0 to 65535

 

Q.19 Variable is a





ANSWER= (A) Data container

 

Q.20 If the value of a variable is varied from object to object isknown as ?





ANSWER= (C) Instance variable