Archives de
Auteur/autrice : Julien Grossi

Java Polymorphism

Java Polymorphism

Polymorphism means « many forms », and it occurs when we have many classes that are related to each other by inheritance. Like we specified in the previous chapter; Inheritance lets us inherit attributes and methods from another class. Polymorphism uses those methods to perform different tasks. This allows us to perform a single action in different ways. For example, think of a superclass called Animal that has a method called animalSound(). Subclasses of Animals could be Pigs, Cats, Dogs, Birds –…

Lire la suite Lire la suite

JavaScript Loops Explained

JavaScript Loops Explained

In JavaScript, loops are used to conduct repeated activities based on a condition.When conditions are analyzed, they usually return true or false.A loop will continue to run until the specified condition is false. The three most common types of loops are for while do while You can type js for, js while or js do while to get more info on any of these. Let’s look at them, and some variations, in more detail now. for loop Syntax The javascript…

Lire la suite Lire la suite

MinMaxing: Understanding vMin and vMax in CSS

MinMaxing: Understanding vMin and vMax in CSS

Vmin and vmax units are far less known and generally poorly understood. This is unfortunate, as the units have some truly novel use-cases in web development. 1vh is equal to 1% of the current viewport height (i.e. the open browser window), while 1vw is 1% of the current viewport width. vmin and vmax use those same units, but in response to particular rules: vmin uses the ratio of the smallest side. That is, if the height of the browser window…

Lire la suite Lire la suite