1 public class FloatComp { 2 3 public static void main (String [] args) { 4 5 float f1 = 0.9F; 6 float f2 = 0.9F; 7 float f3 = 0.5F; 8 float f4 = 0.5F; 9 10 if (f1 == f2 && f3 == f4){ 11 System.out.println(f4); 12 } 13 14 int i = 9; 15 int j = 8; 16 int k = 10; 17 int h = 2; 18 19 boolean b2 = (i == j || win()); 20 } 21 22 private static boolean win(){ 23 return true; 24 } 25 } 26 | Popular Tags |