Double Datatype Example Java Program

Definition

Double is a keyword which designates the 64 bit float primitive type. The java.lang.Double class is the nominal wrapper class when you need to store a double value but an object reference is required.

Syntax

double  = ;

Double Datatype Example Program

class DoubleDatatype{
	public static void main(String[] args){
		double a=22.8;
		double b=100.0;
		System.out.println(""+a);
		System.out.println(""+b);
	}
}

Sample Output

Output is:
22.8
100.0