I.
1. class Basics1 {
2. public static void main(
String[] args) {}
3. }
4. class Basics2 {
5. protected static void main(String[] args) {}
6. }
7. class Basics3 {
8. private static void main(String[] args) {}
9. }
What is the result of attempting to compile and run the above programs?
a. Compiler error at line 2.
b. Compiler error at line 5.
c. Compiler error at line 8.
d. Run time error at line 2.
e. Run time error at line 5.
f. Run time error at line 8.
g. None of the Above
II.
1. class Basics1 {
2. public void main(String[] args) {}
3. }
4. class Basics2 {
5. public void main(String []args) {}
6. }
7. class Basics3 {
8. public void main(String args[]) {}
9. }
What is the result of attempting to compile and run the above programs?
a. Compiler error at line 2.
b. Compiler error at line 5.
c. Compiler error at line 8.
d. Run time error at line 2.
e. Run time error at line 5.
f. Run time error at line 8.
g. None of the Above
mock exam answer:
I.cde
II.def
But I run two example, there isn't compiler error
and Run time error.