aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Runtime Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Runtime Exception " Watch "Runtime Exception " New topic
Author

Runtime Exception

swarupa patil
Ranch Hand

Joined: Feb 22, 2006
Posts: 62
Hi Ranchers
I have doubt about the RuntimeException.If method1()1 use throws clause
and throws RuntimeException.The rule for exception handelling is calling method to method1() must either caught the exception or throws exception.
Code:
Is this code comile (compile)?why:why not;
public void method1()throws NullPointerException
{
}
public void method2()
{
method2();
}
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2341
RuntimeException, Error, and their subclasses are unchecked.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Runtime Exception
 
Similar Threads
Exceptions again
Exception handling!!
exception declaration
Interface and exceptions
Chained exception