4. What is the result of attempting to compile and run the program? public class Question4{ static boolean a, b, c; publ
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
4. What is the result of attempting to compile and run the program? public class Question4{ static boolean a, b, c; publ
compiler.
And give the explanation for each output.
4. What is the result of attempting to compile and run the program? public class Question4{ static boolean a, b, c; public static void main(String[] args) { boolean x = (a = true) || (b = true) && (c = true); System.out.print(a +""+b+""+ c); }} 9 Coding (from compiler): Output (from compiler): Explanation: (5 marks)