Skip to content
Learn Netverks

Lesson

Step 2/36 6% through track

what-is-java

What is Java?

Last reviewed May 28, 2026 Content v20260528
Track mode
server_compiled
Means
Compiled runner
Reading
~2 min
Level
beginner

This lesson

This lesson teaches What is Java?: the syntax, APIs, and habits you need before advancing in Java.

Teams ship What is Java? on every Java codebase—skipping it leaves gaps in debugging and code reviews.

You will apply What is Java? in contexts like: Spring Boot APIs, banking systems, Android (with Kotlin), and batch/data pipelines on the JVM.

Write Java with a public class (lessons use Main), click Run on server—the dev runner runs javac then java; fix compile errors from stderr (LEARNING_RUNNER_ENABLED=true).

After HTML fundamentals and basic programming concepts—before or alongside SQL.

Java is a general-purpose, class-based language created for portable, maintainable software. It powers Spring Boot microservices, large banking systems, Hadoop-era data tooling, and still underpins much Android history (Kotlin interoperates on the same JVM).

Core characteristics

  • Static typing — types checked at compile time; fewer runtime surprises than dynamic languages
  • Bytecode + JVM — source compiles to .class files; the JVM JIT-compiles hot paths
  • Garbage collection — memory reclaimed automatically; tune GC in production, not in hello-world
  • Rich standard library — collections, concurrency, I/O, networking, time API (java.time)

Typical build-run flow

  1. Write Main.java with a public class matching the filename
  2. javac Main.java produces Main.class
  3. java Main starts the JVM and calls main

Important interview questions and answers

  1. Q: Is Java compiled or interpreted?
    A: Both—javac compiles to bytecode; the JVM interprets and JIT-compiles to native code at runtime.
  2. Q: What is the JVM?
    A: The runtime that loads bytecode, manages memory, and provides platform abstraction.
  3. Q: Java vs JavaScript?
    A: Unrelated languages despite the name—Java is statically typed and JVM-based; JavaScript is dynamic and runs in browsers/Node.

Self-check

  1. What file extension do Java source files use?
  2. Name one industry domain where Java is common.

Interview prep

Compiled or interpreted?

Both—javac compiles source to bytecode; the JVM interprets and JIT-compiles hot code to native instructions at runtime.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • JVM vs JRE vs JDK?
  • Compiled vs interpreted?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump