KnowledgeBoat Logo

Computer Applications

Rewrite the following statement using if else:

int max=215, min=323;
String str= (max>min) ? "Max is greater than Min" : "Min is Greater than Max";

Java Conditional Stmts

13 Likes

Answer


int max=215, min=323;
String str="";
if (max > min)
  str = "Max is greater than Min";
else
  str = "Min is Greater than Max";

Answered By

5 Likes


Related Questions