Learn the fundamentals of Java - one of the world's most popular programming languages
Java was created by James Gosling and his team at Sun Microsystems in 1991. Originally named "Oak", it was designed for interactive television but was too advanced. It was later renamed to Java and released in 1995.
Java was designed with the principles of "Write Once, Run Anywhere" (WORA), meaning compiled Java code can run on all platforms without recompilation.
To start Java development, you need to install the Java Development Kit (JDK). The JDK includes:
java -version
An Integrated Development Environment (IDE) makes Java development much easier by providing:
Open-source, widely used, extensive plugin ecosystem
Highly intelligent, excellent code analysis, commercial with free community edition
Official IDE from Oracle, excellent Swing GUI builder
The traditional "Hello World" program is the first step in learning any programming language. Here's how it looks in Java:
public class HelloWorld { // This is the main method where execution begins public static void main(String[] args) { // Print "Hello, World!" to the console System.out.println("Hello, World!"); } }
Compile Java source file javac HelloWorld.java # Run the compiled program java HelloWorld