What will be displayed?

public class Test {
  public static void main(String [] args) {
    float f = 29.1f;
    double d = 29.1;
    System.out.println( f == d );
    f = 29.1f;
    d = 29.1f;
    System.out.println( f == d );
    int i = 1;
    long l = 1L;
    System.out.println( i == l );
  }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes