Getting Started with Java
Introduction to Java Development Environment
Java development requires setting up the Java Development Kit (JDK) and Java Runtime Environment (JRE). The JDK provides tools for writing and compiling Java code, while the JRE allows you to run Java applications.
Setting Up Java (Installation of JDK and JRE)
To install Java, visit Oracle’s official website, download the JDK, and follow the setup instructions for your OS.
Writing Your First Java Program
Create a file named HelloWorld.java
with the following code:
Run the program using the command java HelloWorld
to see the output “Hello, World!” displayed on your screen.