Thanks to visit codestin.com
Credit goes to www.scribd.com

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

12data Type

Uploaded by

ayusharnish
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)
2 views2 pages

12data Type

Uploaded by

ayusharnish
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

DATA TYPES

Data Types : Data Type specify the different sizes and values that can be
stored in the variable. It determines the size and kind of values that can be
stored and manipulated within a program. Java has two main data type.

(1). Primitive Data Type.

(2). User Defined ( Non- Primitive) Data Type.

Data Type

Primary (Primitive)
Non- Primitive

Class
Numeric Non- Numeric
Interface

Byte 1 8bit Char (2bit)


Arrays

Short (2byte) Bloolen (1bit)


String

Int (4 byte)

Long (8 byte)

Float 4byte

Double 8byte

1
Data Type Size Default Value Type of value stored

byte 1 byte = 8bits 0 Integral

short 2 byte 0 Integral

int 4 byte 0 Integral

long 8 byte 0L Integral

char 2 byte ‘\u0000’ Character

float 4 byte 0.0f Decimal

double 8 byte 0.0d Decimal

Boolean 1 bit (till JDK 1.3 it uses false True or False

1byte)

You might also like