to calculate depth of inheritance

how to calculate depth of inheritance in java programs

Page 1 of 1

3 Replies - 4317 Views - Last Post: 13 February 2009 - 03:14 PM Rate Topic: -----

#1 deepikatiwari  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 13-February 09

to calculate depth of inheritance

Posted 13 February 2009 - 01:14 AM

How to calculate depth of inheritance in java programs?
Is This A Good Question/Topic? 0
  • +

Replies To: to calculate depth of inheritance

#2 JohnWaters  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 138
  • Joined: 28-November 08

Re: to calculate depth of inheritance

Posted 13 February 2009 - 01:30 AM

Your not going to get much help here unless you give the answer a go yourself.

try ... http://www.arisa.se/...um/node101.html
Was This Post Helpful? 0
  • +
  • -

#3 bsaunders  Icon User is offline

  • D.I.C Addict

Reputation: 44
  • View blog
  • Posts: 571
  • Joined: 18-January 09

Re: to calculate depth of inheritance

Posted 13 February 2009 - 01:34 AM

You can keep calling the getSuperclass method of the Class class until it returns null.

Class (Java 2 Platform SE 5.0)
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8327
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: to calculate depth of inheritance

Posted 13 February 2009 - 03:14 PM

View Postbsaunders, on 13 Feb, 2009 - 12:34 AM, said:

You can keep calling the getSuperclass method of the Class class until it returns null.

Class (Java 2 Platform SE 5.0)

Funny... never noticed it
Is it only since 1.5 ?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1