Abdullah Fathi
sudo apt-get install openjdk-8-jdk
Locate installed java path:
sudo update-alternatives --config java
sudo vim /etc/environment
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
Reload file : source /etc/environment
echo $JAVA_HOME
Objects have states and behaviors. Example: A dog has states - color, name, breed as well as behavior such as wagging their tail, barking, eating. An object is an instance of a class.
A class can be defined as a template/blueprint that describes the behavior/ state that the object of its type supports.
A method is basically a behavior. A class can contain many methods. It is in methods where the logics are written, data is manipulated and all the actions are executed.
Each object has its unique set of instance variables. An object's state is created by the values assigned to these instance variables
Every class has a constructor. If we do not explicitly write a constructor for a class, the Java compiler builds a default constructor for that class
Java Servlets are programs that run on a Web or Application server and act as a middle layer between a request coming from a Web browser or other HTTP client and databases or applications on the HTTP server