Page 1 of 1

d. (5 Marks) public class FinalExamScope { static int value = 20; public static void main(String[] args) { System.out.pr

Posted: Fri May 20, 2022 11:34 am
by answerhappygod
D 5 Marks Public Class Finalexamscope Static Int Value 20 Public Static Void Main String Args System Out Pr 1
D 5 Marks Public Class Finalexamscope Static Int Value 20 Public Static Void Main String Args System Out Pr 1 (29.39 KiB) Viewed 28 times
d. (5 Marks) public class FinalExamScope { static int value = 20; public static void main(String[] args) { System.out.println(value); int value = 13; System.out.println(value); System.out.println (myMethod()); System.out.println (myMethod (30)); } public static int myMethod () { return (value > 1) ? 9 : 2; } public static int myMethod (int x){ System.out.println(x); return x % 4; }