Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

If Else In Java

// Traditional way
if (20 > 18) {
  System.out.println("20 is greater than 18");
}

// "efficient" way
int time = 20;
String result = (time < 18) ? "Good day." : "Good evening.";
System.out.println(result);
Source by www.ebhor.com #
 
PREVIOUS NEXT
Tagged: #If #Else #In #Java
ADD COMMENT
Topic
Name
2+4 =