About Core Java Data Types Interview Questions

This Core Java Data Types Interview Questions page providing all the interview questions about data type concept in java including primitive data types, data type limits, data conversions, implicit casting, explicit casting, character systems, ASCII, UNICODE and much more.

Core Java Interview Questions – Data types

What is data type?
Data type describes the size of data variable and type of data allowed to store.

How many primitive types does java support?
8 primitive types

What are integer data types in Java?
byte, short, int and long

What a boolean variable holds?
true or false.

Limits of byte data type?
-128 to +127

Limits of short data type?
-32768 to +32767

Limits of UNICODE character?
0 to 65535

What is the size of character data type in java?
2 bytes.

What is character system?
Represents all the symbols of a language using constant integer values.

What is ASCII?
Stands for American Standard Code for Information Interchange
One of the examples of character systems.

Why character occupies 2 bytes in Java?
Web applications need to represent more than 1 language character set at a time.
2 bytes memory(65536) required representing these many languages called UNICODE char system.

What is Type casting?
Conversion of data from one type to another type at the time of application execution.

What is Implicit type Casting?
JVM converts the data automatically from one type(lower) to another type(higher).
for example byte to int

What is Explicit type casting?
The programmer needs to convert manually from one type(higher) to another type(lower).
for example int to byte

>Core Java Interview Questions about main() method<

Share this