• Post Reply 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
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Inner classes V/s subclasses

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Difference between the two regarding their purpose of
use?
answer in detail
- thanks in advance
mohan
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Inner class can be used when we want to do some work within the scope of the other class and it need not exist seperately. A good example is creating a linked list class. To create a linked list class, we need to create a node. This node can be an inner class.
Sub classes are classes which derives from the other class (parent class) to provide more specific functionality.
Hope this helps
Ram
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic