Home
MCQs
Java MCQs
Data Types
Java MCQs

Java MCQs - Data Types

Data type identify the size and type of the value that can be stored in variable. The Java Language is rich by perspective of data types which allow you to go with different types and different sizes of the variable. Here is a list of all possible Data type MCQs with interview questions and answers.

21. What is the output of this program?

A. 0 default value

B. Compile time error - Instance variable may not have been initialized

C. Run time error - Instance variable may not have been initialized

D. None of Above

Answer: A

22. What is the output of this program?

A. 0 default value

B. Compile time error - Class variable may not have been initialized

C. Run time error - Class variable may not have been initialized

D. None of Above

Answer: A