public class Test {
public static void main(String[] args){
if (5.0 > 5) // (5.0<5) for both case it is going to else
System.out.println("5.0 is greater than 5");
else
System.out.println("else part always comes here");
/*another sample*/
if (5.0 == 5)
System.out.println("equals");
else
System.out.println("not equal");
}
}
can any one explain the first "if statement" why it always come to else part
second else part prints "equals "