Answers for "java one line if else"

7

java one line if else

statement ? true 	: 	false
  ^		  |	 ^			  ^
condition |   (instruction)
  		  |  If the statement:  
  		  |	is true | is false
--------------------------------------------------------------------------------
 Example:
int i = 10;

String out = i > 8 ? "Bigger than Eight!" : "Smaller than Eight!";
System.out.println(out);
Posted by: Guest on October-10-2020
4

one line if statement java

statement ? true : false
Posted by: Guest on March-27-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language