What is a double?
Double literals in Java are numbers that contain a decimal point:
3.14 0.0 -1000.0
Declaration and Initialization Syntax
As for all data types, declaring and initializing a double follows the syntax:
<type> <name> = <value>;
So, declaring and initializing a double looks like:
double valueOfAQuarter = 0.25; double myGPA = 3.75; double phoneBattery = 0.67 // in percent
Most useful for when you need percentages and more precise numbers.