Overriding a method that throws a checked exception
QuizMedium-HardJava onlyAsked in: Accenture, Capgemini, Infosys, TCS, Wipro
A parent method is declared void m() throws FileNotFoundException. Which overriding declarations in a subclass compile? Pick all that apply.
void m()void m() throws FileNotFoundExceptionvoid m() throws IOExceptionvoid m() throws IllegalStateException
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.