Computer Science, asked by leeandreidecastro31, 5 months ago

conditonal statement in java examples​

Answers

Answered by ArshadRauf
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