About Question enthuware.jwpv6.2.1074 :

Moderator: admin

Post Reply
VimalKumar

About Question enthuware.jwpv6.2.1074 :

Post by VimalKumar »

In the exhibit,
1. doPost() of LoginServlet does not declare to throw IOException() and ServletException().
2. Similarly, doPost() of ReportServlet does not declare to throw ServletException().

So both of the servlets would fail to compile, right?

correct me if am wrong.

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.1074 :

Post by admin »

No, an overriding method is free not to declare any exception declared in the overridden method.

HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests