package javaapplication1;
// Literal variables with a fixed value
public class Example {
public static void main(String[] args)
{
double d = 1234.5;
System.out.println("double: " + d);
double scientificd = 1.2345e3;
System.out.println("double scientific: " + scientificd);
float f = 1234.5f;
System.out.println("float: " + f);
}
}
/*
run:
double: 1234.5
double scientific: 1234.5
float: 1234.5
*/