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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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?
    Bookmark Topic Watch Topic
  • New Topic