0

I have made a code, but I am confused if I am using composition or not? Basically, I have a class "FinalMicroRNA" that has two variables declared in it. I then have class "FinalComparison" that makes an array of FinalMicroRNA type. Is this composition?

Bakhtawar
  • 19
  • 5
  • I'd like to see a code example, but off the top of my head it sounds like composition. If you didn't use `extends` or `implements`, it's probably composition. – markspace May 20 '15 at 15:48
  • yeah...I haven't used extends keyword which means its composition. Thankyou – Bakhtawar May 20 '15 at 15:51
  • It might help , Read this : http://www.javaworld.com/article/2075345/java-platform/java-101--object-oriented-language-basics--part-3--composition.html – Pratik Shah May 20 '15 at 16:02

0 Answers0