📌What is inheritance?
When we want to create a new class and there is already a class that includes some of the code that we want, we can derive our new class from the existing class (and avoid the writing of the same code again). This is referred to as inheritance.
📌Example
📌Terms
🔸Superclass/Parent class/Base class-
The class whose features are inherited
🔸Subclass/Child class/Derived class-
The class that inherits the other class features.
📌Java syntax
Using the 'extends' keyword
📌Types of inheritance
Can be simply understood through this image
As a programmer you might have come across both these words- coding and programming but do you know the actual difference between the two
Let us look at the difference between both these terms now and let me clear your doubts.
Read to the end of the thread!
📌Coding
Coding is basically the act of translating codes from human language to machine-based language. It can also be called a subset of programming since it is the foundation of programming
The command will return an absolute (full) path, which is basically a path of all the directories that starts with a forward slash (/).
An example of an absolute path is /home/username
🔸cd -
To change to a different directory
Example: cd workspace
There are some shortcuts to help you navigate quickly:
-> cd .. to move one directory up
-> cd to go straight to the home folder
-> cd- to move to your previous directory
🔸IP address -
IP stands for Internet Protocol Address. It is a numerical label assigned to each device connected to a computer network that uses Internet Protocol for communication.
The internet needs a way to differentiate between different computers, routers, and websites. IP addresses provide a way of doing so and form an essential part of how the internet works.
🔸Repository
A repository is like a folder for your project. It contains the collection of the file as well as the history of the changes made to those files. Sometimes Github users shorten this as 'repo'
🔸Branch
A branch is a parallel version of a repository. It is contained within the repository but does not affect the primary or master branch allowing you to work freely without disrupting the 'live' version.