conditonal statement in java examples
Answers
Answered by
0
Answer:
plz mark as brainlist
Explanation:
Example:
public class IfElseTernaryExample {
public static void main(String[] args) {
int number=13;
//Using ternary operator.
String output=(number%2==0)? "even number":"odd number";
System. out. println(output);
}
}
Similar questions