Page 1 of 1

Please take time and answer it correctly and properly.

Posted: Tue Jul 05, 2022 10:27 am
by answerhappygod
Please take time and answer it correctly and properly.
Please Take Time And Answer It Correctly And Properly 1
Please Take Time And Answer It Correctly And Properly 1 (81.42 KiB) Viewed 11 times
2. a) What is the role of default and protected access modifier in Java? b) What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor? c) Find out the error of the following Java code. How do you fix the error? public class Test { } public static void main(String[] args) { int x = getValue(); System.out.println(x); } public static getValue() { return 10; }