In this Java program we are going to use
Conditional Operator
//use of Conditional Operator
class ConditionalOperator1{
public static void main(String args[]){
int a=5;
String
b=(a==5)?"TRUE":"FALSE";
System.out.println("The value of a is:
" +a+ " which is "+b);
}
}
No comments:
Post a Comment