Junior — Middle
Could you name two main types of data used in the Java language?
sobes.tech AI
Answer from AI
In Java, there are two main types of data:
-
Primitive types — these are basic data types such as
int,double,boolean,char, and others. They store values directly and have a fixed size. -
Reference types — these are objects and arrays that store references to the memory location where the data is stored. For example, classes, interfaces, arrays.