Blog Archives

JavaScript Inheritance: Pseudoclassical vs. Prototypal

JavaScript is a prototypal object-oriented language, which means objects can inherit directly other objects. This is in contrast with the classical languages such as Java, where a subclass inherits from a superclass, and objects are instances of classes. However, the

Tagged with: , , ,
Posted in JavaScript, Web

Inheritance in Java

The following are different relationships between classes. Let A and B be two classes. Dependency: A uses B Aggregation: A has-a B (as an attribute) Inheritance: B is a kind of A Subclass and Superclass In Java, new classes (child

Tagged with: , , , , , ,
Posted in Java