Using ++ and -- with floating-point variables : Float Point Data Type « Data Type « Java Tutorial






public class MainClass{

  public static void main(String[] arg){
     double a = 12.12;
     
     System.out.println( a-- );
     System.out.println( a++ );
     System.out.println( --a );
     System.out.println( ++a );
  }

}
12.12
11.12
11.12
12.12








2.10.Float Point Data Type
2.10.1.Floating-Point Data Types: memory and length
2.10.2.Write Floating-Point Literals with an exponent
2.10.3.Floating-Point Calculations
2.10.4.Using ++ and -- with floating-point variables
2.10.5.Applying the modulus operator, %, to floating-point values