No Image

Class and object initialization in Java

9 7 月, 2019 Jeff Friesen 0

Classes and objects in Java must be initialized before they are used. You’ve previously learned that class fields are initialized to default values when classes are loaded and that objects are initialized via constructors, but there is more to initi…

No Image

Class and object initialization in Java

9 7 月, 2019 Jeff Friesen 0

Classes and objects in Java must be initialized before they are used. You’ve previously learned that class fields are initialized to default values when classes are loaded and that objects are initialized via constructors, but there is more to initi…

No Image

Java polymorphism and its types

30 5 月, 2019 Jeff Friesen 0

Polymorphism refers to the ability of some entities to occur in different forms. It is popularly represented by the butterfly, which morphs from larva to pupa to imago. Polymorphism also exists in programming languages, as a modeling technique that …

No Image

Java polymorphism and its types

30 5 月, 2019 Jeff Friesen 0

Polymorphism refers to the ability of some entities to occur in different forms. It is popularly represented by the butterfly, which morphs from larva to pupa to imago. Polymorphism also exists in programming languages, as a modeling technique that …

No Image

When to use composition vs inheritance

16 5 月, 2019 Jeff Friesen 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. Composition is a closely related programming technique that is used to establish has-a relationships i…

No Image

When to use composition vs inheritance

16 5 月, 2019 Jeff Friesen 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. Composition is a closely related programming technique that is used to establish has-a relationships i…

No Image

Inheritance in Java, Part 2: Object and its methods

7 5 月, 2019 Jeff Friesen 0

Java provides a standard class library consisting of thousands of classes and other reference types. Despite the disparity in their capabilities, these types form one massive inheritance hierarchy by directly or indirectly extending the Object class…

No Image

Inheritance in Java, Part 2: Object and its methods

7 5 月, 2019 Jeff Friesen 0

Java provides a standard class library consisting of thousands of classes and other reference types. Despite the disparity in their capabilities, these types form one massive inheritance hierarchy by directly or indirectly extending the Object class…

No Image

Inheritance in Java, Part 1: The extends keyword

7 5 月, 2019 Jeff Friesen 0

Java supports class reuse through inheritance and composition. This two-part tutorial teaches you how to use inheritance in your Java programs. In Part 1 you’ll learn how to use the extends keyword to derive a child class from a parent class, invoke…

No Image

Inheritance in Java, Part 1: The extends keyword

7 5 月, 2019 Jeff Friesen 0

Java supports class reuse through inheritance and composition. This two-part tutorial teaches you how to use inheritance in your Java programs. In Part 1 you’ll learn how to use the extends keyword to derive a child class from a parent class, invoke…