It shows output as "Success" but still the platform shows error


#1

public class IfElse{

public static void main (String[] args){

if (7<7 && false){

  System.out.println("Try Again....");
}

else
{

  System.out.println("Success");
}

}

}

it shows output as "Success" but still the platform shows error


7. If-Else Statement
#2

It looks like you have changed the base code, it should be:

System.out.println("Success!");

You have to add the exclamation mark.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.