[go: up one dir, main page]

0% found this document useful (0 votes)
8 views2 pages

ClassX Data Types

The document explains data types in Java, categorizing them into primitive and non-primitive types. Primitive data types are predefined and include boolean, char, byte, short, int, long, float, and double, totaling eight types. Non-primitive data types, created by programmers, include Classes, Interfaces, String, and Arrays, offering more flexibility for complex data storage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

ClassX Data Types

The document explains data types in Java, categorizing them into primitive and non-primitive types. Primitive data types are predefined and include boolean, char, byte, short, int, long, float, and double, totaling eight types. Non-primitive data types, created by programmers, include Classes, Interfaces, String, and Arrays, offering more flexibility for complex data storage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Class - X

Data Types in Java

In programming languages, data types specify the different sizes and values that can
be stored in the variables. It makes Java a statically and strongly typed language.
There are the following two types of data types in Java.

Primitive Data Types: These data types are predefined by the language and represent
single values. They are the most basic building blocks for data manipulation in Java. It
include boolean, char, byte, short, int, long, float and double. Number of primitive data
types in Java is 8.

Non-Primitive Data Types:

Non-primitive data types in Java, also known as reference types, store references to
objects in memory. They are not predefined and are created by the programmer.
These data types offer more flexibility and can store complex data compared to
primitive types. The non-primitive data types include Classes, Interfaces, String, and
Arrays.

Default Values Of Date types

You might also like