Data types in java programming tccicomputercoaching com

Page 1

DATA TYPES IN JAVA PROGRAMMING Tccicomputercoaching.com In this article we will learn about the java data types. Variable is a memory location where we can store the data. There are three types of variables: local, instance and static. There are two types of data types in java, primitive and non-primitive. Data Types in Java In general every programming language is containing three categories of data types. They are Fundamental or primitive data types Derived data types User defined data types.

Primitive data types Primitive data types are those whose variables allows us to store only one value but they never allows us to store multiple values of same type. This is a data type whose variable can hold maximum one value at a time.

Data Type Default Value

Default size

boolean

false

1 bit

char

'\u0000'

2 byte

byte

0

1 byte

short

0

2 byte

int

0

4 byte

long

0L

8 byte

float

0.0f

4 byte


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.