0% found this document useful (0 votes)
0 views3 pages

05 FloatAndChar

The document discusses the Float and Character data types in Java, explaining that float numbers are stored in binary using the IEEE 754 format and that double is used for precise decimal values. It also covers how characters are represented using numeric codes known as ASCII, which are part of the broader Unicode system that supports multiple languages. The document highlights the importance of these data types in programming for accurate representation of numerical and character data.

Uploaded by

Avinash Nair
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)
0 views3 pages

05 FloatAndChar

The document discusses the Float and Character data types in Java, explaining that float numbers are stored in binary using the IEEE 754 format and that double is used for precise decimal values. It also covers how characters are represented using numeric codes known as ASCII, which are part of the broader Unicode system that supports multiple languages. The document highlights the importance of these data types in programming for accurate representation of numerical and character data.

Uploaded by

Avinash Nair
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/ 3

Java

Float and Character Datatype

• A decimal number is not stored inside the memory but they


represent decimal number . so, in order to avoid it we move
the decimal point that means we oat that point hence we
call it as oat type

• The oat number is stored in binary form and its conversion


is done as follows the standard used for conversion is IEEE
754 format

Float

163.52

163.52 x 100 / 100

16352 x 1 / 100
-2
16352 x 10

• When you want to precise value in decimal point then we can


go for double because in some cases detail decimal value is
needed for accurate result.

• It supports upto 14 numbers under


fl
fl
fl
Char :

• The computer doesn’t support alphabets so we use numeric


code for theses characters . So, those codes are called ASCII
codes

• This is supported by other programming language

• Not only for English but they are codes available for every
natural language in the world as internet supports various
languages so must the machines too theses codes are called
unicodes

• Therefore ASCII codes comes under Unicode

ASCII Table :

You might also like