skip to main | skip to sidebar

WebGismo

--Java, J2EE ~by Highbrow

Thursday, June 21, 2007

Q. When should I use inheritance, when aggregation?

A: They are Two different relationships!

He is a human, human has a heart!

ISA: inheritance //He is a human,
HASA: aggregation //human has a heart
Posted by Contact: highbrow.admin@gmail.com at 11:44 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Search This Blog

Contact

highbrow.admin@gmail.com

My Sites

  • http://java300.blogspot.com/
  • http://oracle500.blogspot.com/

Recommended Sites

  • Java Programming
  • SCJP Q & A

Blog Archive

  • ▼  2007 (47)
    • ▼  June (17)
      • Threads
      • inner, nested, anonymous classes
      • Static, Interface and abstract class
      • What kind of Java methods does not participate pol...
      • Q. When should I use inheritance, when aggregation?
      • static method override
      • Difference between new String("hello") and "hello"
      • Remember
      • Q. Can we declare an object as final?
      • What is modifier for the default constructor impli...
      • Does Java initialize static variable first when we...
      • What are the variable initialization rules in Java?
      • In Java, everything is pass-by-value
      • How to properly dispose of (close) JDBC resources
      • Replace "." using regexp
      • Good SCJP Q&A (mostly theory)
      • Difference between error and an exception?
    • ►  May (11)
    • ►  April (2)
    • ►  February (17)