This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes try catch........... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "try catch..........." Watch "try catch..........." New topic

try catch...........

faiza haris
Ranch Hand

Joined: Oct 17, 2000
Posts: 173
why does it give ... undeclared exception e.......error?

I added some UBB code here. -Mapraputa
[This message has been edited by Mapraputa Is (edited October 19, 2000).]
Surya Bahadur
Ranch Hand

Joined: Sep 28, 2000
Posts: 88
You need to say that your method throws exception if you are throwing that exception in your code,so change the method signature to
private void test() throws MalformedURLException,EOFException
Then your code would compile,or comment out the throw statement in the catch block.
faiza haris
Ranch Hand

Joined: Oct 17, 2000
Posts: 173
I agree. Here's the link:
subject: try catch...........
It's not a secret anymore!