Добавить новость
smi24.net
Computerworld
Октябрь
2015
1 2 3 4 5 6 7 8 9
10
11
12 13 14 15 16 17 18 19 20 21 22 23
24
25
26 27 28 29 30
31

Java 101 primer: Composition and inheritance

0

In "Java 101: Inheritance in Java, Part 1," you learned how to leverage inheritance for code reuse, by establishing is-a relationships between classes. This free Java 101 primer focuses on composition, a closely related programming technique that is used to establish has-a relationships instead. Whereas inheritance extends the features of one class to another, composition allows us to compose a class from another class. The distinction may seem subtle, but it will make more sense once you see it in code.

To read this article in full or to leave a comment, please click here

(Insider Story)














Музыкальные новости






















СМИ24.net — правдивые новости, непрерывно 24/7 на русском языке с ежеминутным обновлением *