What is Java?
Why Java exists, what it powers, why universities teach it — and why Java is NOT JavaScript.
Three billion devices run Java. That number was on Java's installer for years — and it's now an undercount.
Java was created by James Gosling's team at Sun Microsystems in 1995 (Oracle maintains it today), and it became one of the most-used languages in history:
- Android apps — Java was Android's original language, and the Android platform is still built on it
- Minecraft — the original edition is written entirely in Java
- Banks and enterprises — the world's payment, airline, and insurance systems run on Java servers
- Big data — Hadoop, Elasticsearch, and Kafka are Java programs
- Your university — Java has been the standard first language of computer science degrees and AP Computer Science for two decades
If you're taking a CS course, there's a very good chance the exam at the end of it is a Java exam. This track is built to get you through it.
Let's clear up the single most common beginner confusion right now:
Java is not JavaScript.They are two completely unrelated languages. In 1995, the company behind the Netscape browser renamed its new scripting language "JavaScript" to ride on Java's hype — a marketing move that has confused beginners ever since. Programmers joke: "Java is to JavaScript as car is to carpet."
| | Java | JavaScript |
|---|---|---|
| Runs on | The JVM — servers, Android, desktops | Browsers and Node.js — the web |
| Checking | Types checked before running | Types checked while running |
| Typical use | Android, enterprise backends, CS courses | Websites and web apps |
If your goal is websites, LingoCode's JavaScript track is the one you want. If your goal is Android, university exams, or enterprise backends — you're in exactly the right place.
What is the relationship between Java and JavaScript?
- ANone — they are unrelated languages; the similar name was a 1995 marketing move
- BJavaScript is the newer version of Java
- CJava is JavaScript compiled to bytecode
- DJavaScript is Java for websites
Why do universities teach Java first? Because Java is strict — and strict is great for learning.
Java is strongly typed: every piece of data has a declared type (whole number, text, true/false…), and the compiler checks before the program runs that you're using every value correctly. Try to put text where a number belongs and Java refuses to compile.
That strictness means:
1. Mistakes surface immediately — at compile time, with a line number, instead of exploding later while the program runs.
2. Reading code teaches you more — every variable announces what it is.
3. Exams love it — "will this compile?" and "what is the type of this expression?" are Java exam staples, and you'll practice both throughout this course.
Java's other superpower is object-oriented programming (OOP) — organizing code into classes and objects. It's the heart of every university Java course, and Modules 7 and 8 of this track are devoted to mastering it.
Here's a complete Java program. Don't worry about memorizing it — the next lesson walks through every line slowly.
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}A quick preview of what you're looking at:
public class Main { ... }— Java code lives inside a class (a named container).public static void main(String[] args)— the starting point; every Java program begins here.System.out.println("Hello, World!");— prints text to the screen.
When compiled and run, this program prints Hello, World! — the traditional first program in any language.
What does this program print?
public class Main {
public static void main(String[] args) {
System.out.println("Java");
System.out.println("Rocks");
}
}- AJava Rocks
- BJava Rocks
- CJavaRocks
- DError
Java's famous slogan is "Write once, run ___" — thanks to the JVM.