The correct if statement for the following ternary operation statement is:
System.out.println(n%2 == 0? “true”:” false”);
-
if(n%2==0)
return true;
else
return false;
-
if(n%2==0)
return “true”;
else
return “false”;
-
if(n%2==0)
System.out.printIn(“true”);
else
System.out.println(“false”);
-
if(n%2==0)
return false;
else
return false;
return true;
else return false;
return “true”;
else
return “false”;
System.out.printIn(“true”);
else
System.out.println(“false”);
return false;
else
return false;