Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

how to distinguish which are check exceptions and which are run time exceptions

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
how to tell which are check exceptions and which are run time exceptions only from the class name whithout memorized to many things??
this is from Dan Chisholm's Mock Exam
----------------------------------------
1. class A {
2. void m1() {throw new ClassNotFoundException();}
3. void m2() {throw new ArithmeticException();}
4. void m3() {throw new ClassCastException();}
5. void m4() {throw new IllegalArgumentException();}
6. void m5() {throw new CloneNotSupportedException();}
7. void m6() {throw new NoSuchFieldException();}
8. }
What is the result of attempting to compile the program?
a.
Compiler error at line 2.
b.
Compiler error at line 3.
c.
Compiler error at line 4.
d.
Compiler error at line 5.
e.
Compiler error at line 6.
f.
Compiler error at line 7.
g.
None of the Above
---------------------------------------------
I just wondered if I take the scjp,should I remember all the subclasses of RumTimeException And Exception??I think it's really a hard work.
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not post the same question multiple times.
Continue this discussion at Need I?remember all this things?
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic