✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
The following code has error(s).
class Demo{ void msg() { System.out.println("1"); } } public class Sample extends Demo{ @Override void msg() throws Exception { System.out.println("2"); } public static void main(String args[]) { Demo obj = new Sample(); obj.msg(); } }
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!