Double Data Type In Java

Card image cap

Double Data Type ?

Variable of type double represents double precision floating point numbers and have 15 significant digits. It is a 64 bits data type. It can be ranged from 1.7e-308 to 1.7e+3.8

This data tye is generally used as the default data type for decimal values, generally the default choice .

Double data type shu-ould never be used for precise values.


      double d1 = 82.3;
Card image cap

Example 1:

Output :

Double :123.43555
Character :e
Boolean :true 

Example 2:

Output :


Example 3:

Output :

Value Of byte Variable is 5
Value Of short Variable is 20
Value Of int Variable is 30
Value Of long Variable is 60
Value Of float Variable is 20.0
Value Of double Variable is 20.123
Value Of boolean Variable is true
Value Of char Variable is W
Card image cap