Quizzes on Collections Framework

Read carefully before answering

Question 1
1 / 10

Given the following code snippet: `class A { public void methodA() throws Exception { System.out.println("A"); } } class B extends A { public void methodA() { System.out.println("B"); } } public class Main { public static void main(String[] args) { A a = new B(); try { a.methodA(); } catch (Exception e) { System.out.println("Exception"); } } }`. What will be the output?

Total Questions

10
Answered
Marked
Not Visited
Instructions:
Navigation between questions is allowed. Your answers are auto-saved instantly.