Untitled

 avatar
unknown
plain_text
a month ago
361 B
2
Indexable
// what will be the value of x & y in the following program. (Ternary Operator)

public class Question_4 {
    public static void main(String[] args) {
        
        int a = 63, b= 36;
        
        boolean x = (a < b) ? true : false; 

        int y = (a> b) ? a : b;

        System.out.println(x);
        System.out.println(y);
    }
}
Leave a Comment