1 Replies - 1374 Views - Last Post: 11 July 2011 - 08:04 AM Rate Topic: -----

#1 cheezpwr2  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 09-July 11

Exception and Inheritance Questions.

Posted 11 July 2011 - 08:01 AM

Can anyone explain just what the exception class is and how it works?
Also, how is inheritance used in java?
Is This A Good Question/Topic? 0
  • +

Replies To: Exception and Inheritance Questions.

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10558
  • View blog
  • Posts: 39,065
  • Joined: 27-December 08

Re: Exception and Inheritance Questions.

Posted 11 July 2011 - 08:04 AM

Inheritance is used when one class needs the base functionality in another, or there is a logical inherent relation. For example, a SavingsAccount class extends an Account class. Check out this tutorial on inheritance.

The Exception class is used to indicate there was a problem at runtime that isn't necessarily a syntax error. It is thrown using the throws keyword when there is a problem. Check out these tutorials on Exception handling:
http://www.dreaminco...-catch-finally/
http://www.dreaminco...g-and-chaining/
http://www.dreaminco...ed-customizing/
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1