fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12.  
  13. int i = 1234567890;
  14. float f = i;
  15. int backAgain = (int)f ;
  16. int result = i - backAgain ;
  17. boolean isZero = ( result == 0 ) ;
  18.  
  19. System.out.println( "isZero: " + isZero ) ;
  20. System.out.println( "i: " + i ) ;
  21. System.out.println( "f: " + f ) ;
  22. System.out.println( "backAgain: " + backAgain ) ;
  23. System.out.println( "result: " + result ) ;
  24.  
  25.  
  26. }
  27. }
Success #stdin #stdout 0.13s 50732KB
stdin
Standard input is empty
stdout
isZero: false
i: 1234567890
f: 1.23456794E9
backAgain: 1234567936
result: -46