What are Data Types?
Advertisements
Question
What are Data Types?
Long Answer
Advertisements
Solution
Data Types in Java are used to specify the type of data that a variable can store. They determine the nature of values, the memory required for storing data and the operations that can be performed on them.
- Primitive Data Types: These are the basic built-in data types used to store simple values such as numbers, characters and Boolean values. Examples include
byte,short,int,long,float,double,charandboolean. - Non-Primitive Data Types: These are reference data types used to represent objects and more complex data structures. Examples include classes, arrays, interfaces and
String.
shaalaa.com
Is there an error in this question or solution?
