Double Data Type In Java

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.

Syntax:


      double d1 = 82.3;
  

Example 1:



Output :

Double :123.43555
Character :e
Boolean :true 

Example 2:



Output :

x
y
xy
1
5
6 

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