1 | Another type of values that you can use in most programming languages is a type for real numbers, i.e. numbers with decimal points. These are sometimes called floating point numbers, and Java has type float. But primarily Java uses a type double for these (so-called because they can be twice as big). |
2 | The same arithmetic operators like +, -, * and / are used. |
3 | double x, y ; |
4 | x = 1.5 ; |
5 | y = x / 2.0 ; |