fork download
  1. class foo
  2. {
  3. public static void main (String[] args) throws java.lang.Exception
  4. {
  5. Double a = 0.2;
  6. Double b = 1.0 - 0.8;
  7. if(a.equals(b)){
  8. System.out.println("Equal!");
  9. }
  10. else{
  11. System.out.println("Not equal :(");
  12. }
  13. }
  14. }
Success #stdin #stdout 0.04s 4386816KB
stdin
Standard input is empty
stdout
Not equal :(