Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
Data Types Chapter 3

Data Types Chapter 3

Ratings: (0)|Views: 7|Likes:
Published by Govind Upadhyay
java notes
java notes

More info:

Published by: Govind Upadhyay on May 13, 2014
Copyright:Traditional Copyright: All rights reserved

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

05/13/2014

pdf

text

original

 
Data Types, Arrays
 
Data Types
 
Java defines eight simple (or elemental) types of data:
byte
,
short
,
int
,
long
,
char 
,
float, double
, and
boolean
.
These can be put in four groups:
Integers This group includes
byte
,
short
,
int
, and
long
, which are for whole valued signed numbers.
Floating-point numbers This group includes
float
and
double
, which represent numbers with fractional precision.
Characters This group includes
char 
, which represents symbols in a character set, like letters and numbers.
Boolean This group includes
Boolean
, which is a special type for representing true/false values
 
Integers
Java defines four integer types:
byte
,
short
,
int
, and
long
. All of these are signed, positive and negative values.
 
long
64,
int
32,
short 16, byte
8
Byte
The smallest integer type is
byte
. This is a signed 8-bit type that has a range from
 – 
128 to 127.
Variables of type
byte
are especially useful when you’re working with
a stream of data from a network or file. They are also useful when
you’re working with raw binary data that may not be directly compatible with Java’s other built
-in types.

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->