Question: Which statements are true about the following code? Select the one correct answer. (a) The program will not compile. (b) When run, the program throws
Which statements are true about the following code?
![public class RQ05A100 { public static void main(String[] args) { int n1](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1706/9/3/8/11665bdcf04bf9c21706938114175.jpg)
Select the one correct answer.
(a) The program will not compile.
(b) When run, the program throws an ArithmeticException at runtime.
(c) When run, the program will print 10.
(d) When run, the program will print 20.
(e) When run, the program will print 30.
public class RQ05A100 { public static void main(String[] args) { int n1 = 10, n2 = 10; int m1 = 20, m2 = 30; int result = n1 != n2? n1: ml n1 = n2? n1 ml != m2? m1 : m2; (result); System.out.println }
Step by Step Solution
3.39 Rating (146 Votes )
There are 3 Steps involved in it
d The condition in the outer cond... View full answer
Get step-by-step solutions from verified subject matter experts
