
Java is a computer programming language that is concurrent, class-based and object-oriented.
The advantages of object oriented software development are shown below:
- Modular development of code, which leads to easy maintenance and modification
- Reusability of code
- Improved reliability and flexibility of code
- Increased understanding of code
Object-oriented programming contains many significant features, such as:
- Encapsulation
- Inheritance
- Polymorphism
- Abstraction
In order to be able to compile and run Java code in your computer, Java JDK must be installed on your computer
JDK stands for "Java Development Kit"
Once you have JDK installed on your computer you can navigate to the folder where all the executable files are located
C:\Program Files\Java\jdk-22\bin

The first thing you'll have to do is to add the Java's bin folder path inside the system's PATH
PATH is an "environment variable" that tells the OS where to find executable files
You must use the "set path" CLI command as shown below:
set path=%path%;C:\Program Files\Java\jdk-19\bin

You can echo the variable to see if the new entry is there now
echo %PATH%
java --version
See below the classic "Hello World" in Java

We are going to use 2(two) executable files, "javac.exe" when compiling and "java.exe" when running
java.exe will invoke the java Virtual Machine in the background, totally transparent for us
Before Compilation


After Compilation
Immediately after the compilation is done, you'll see that another file was created
that file with extension ".class" is what in Java is known as "bytecode"

Those of you who are new to Java programming, could take advantage of "JShell" which is often helpful for trying out the code snippets.
JDK 9 and above include this tool that lets you execute a snippet of Java code instead of writing a full Java program.
- For Beginners -> Practice and Learn the syntax
- For Developers -> Execute part of program in simple way
JShell is a Read-Evaluate-Print-Loop (REPL), which evaluates declarations, statements, and expressions as they are entered and immediately shows the
results.
jshellNo semicolons needed
System.out.println("Hello JDK 19!")/exit
A Package declaration is something needed when running the java Hello World code using Eclipe IDE

package package01;
public class HelloWorld {
public static void main(String[] args) {
// Declare and set in one line
Integer myfirstvar = 77;
// Print the value concatenated (plus sign +) with some random text for better understanding
System.out.println("My first variable has a value of: " + myfirstvar);
}
}






