KwickAcademy Java · 8 min · free
Introduction to Java: Features, JVM, Bytecode and Your First Program
What Java is, how javac makes bytecode, how the JVM runs it anywhere, the JDK-JRE-JVM order, and your first Hello program.
Follows the syllabus of: CBSE Class 11 Information Technology (802), CBSE Class 12 Information Technology (802), ICSE Class 9 Computer Applications, ISC Class 12 Computer Science (868)
On screen in this lesson
What is Java?
| A programming language released by Sun Microsystems in 1995 |
| Now developed by Oracle and a large open community |
| Used for Android apps, bank and shop servers, big websites |
| Also used in school labs through BlueJ and NetBeans |
Features of Java
| Feature | Meaning | Example |
|---|---|---|
| Platform neutral | runs on any OS | one file, all PCs |
| Object oriented | built from objects | a Student class |
| Simple | no pointers | easier than C++ |
| Secure | runs in the JVM | no direct memory |
| Robust | catches errors | exceptions |
Three new words
| Source code: the program you type, in a .java file |
| Compiler (javac): checks and translates the whole file |
| Bytecode: the translated code, in a .class file |
Write once, run anywhere
| Computer | Needs | Runs Hello.class? |
|---|---|---|
| Windows laptop | JVM for Windows | yes |
| MacBook | JVM for macOS | yes |
| Linux server | JVM for Linux | yes |
JDK, JRE and JVM
| Name | Stands for | Job |
|---|---|---|
| JVM | Virtual Machine | runs bytecode |
| JRE | Runtime Environment | JVM + libraries |
| JDK | Development Kit | JRE + javac, tools |
How they fit together
| JDK contains the JRE, and the JRE contains the JVM |
| To write and compile programs, you need the JDK |
| Today you simply install one JDK; it has everything |
Quick answers
Why is Java called write once, run anywhere?
Each operating system has its own JVM, and all of them run the same bytecode.
Which one do students need to install?
The JDK, because only it includes the javac compiler.
KwickClips from this lesson
Short clips, one idea each. Good for revision the night before.
Is Java still used?43 sec
What does javac produce?39 sec
Which contains which?47 sec
What are the BlueJ steps?40 sec
Why will my program not compile?41 secThe full lesson, in text
Hello students, welcome to Kwickprep. The same Java file runs on Windows, on a Mac and on Linux without changes. How is that possible? Today you will learn what Java is, and how bytecode and the Java Virtual Machine work. You will also learn J D K, J R E and J V M. Then we will write, compile and run your first program.
First, what is Java? It is a programming language, first released by Sun Microsystems in nineteen ninety five. Today Oracle leads its development, along with a large open source community. Java runs many Android apps, and the servers behind banks, online shops and large websites. In schools, we write Java in simple editors called BlueJ and NetBeans.
Exams often ask for the features of Java, so here are five. Platform neutral, also called platform independent, means one compiled program runs on any operating system. Object oriented means programs are built from objects, like a Student with marks. Simple means Java removed hard parts of C plus plus, like pointers. Secure means the program runs inside a protected machine and cannot touch memory directly. Robust means Java checks for errors strictly, and handles run time problems with exceptions.
Before we see how Java runs, learn three new words. Source code is the program you type, saved in a file ending dot java. A compiler is a program that checks your whole file and translates it, and Java's compiler is called javac. Bytecode is the result of that translation, saved in a file ending dot class.
Now watch the whole journey, step by step. First, you type your program and save it as Hello dot java. Next, javac compiles the file. If there are errors, like a missing semicolon, you fix them and compile again. With no errors, javac creates Hello dot class, which holds bytecode. Then the Java Virtual Machine, the J V M, reads the bytecode and runs it on your computer. Finally, the output appears on the screen.
This is why Java is called write once, run anywhere. A Windows laptop has its own J V M, and it runs the same Hello dot class. A MacBook has a J V M made for mac O S, and it runs the same file. A Linux server has a Linux J V M, and again the same bytecode runs. The J V M changes, the bytecode does not.
Three short names confuse many students, so let us fix them. J V M is the Java Virtual Machine, and it runs the bytecode. J R E is the Java Runtime Environment, which is the J V M plus the ready made libraries a program needs. J D K is the Java Development Kit, which is the J R E plus tools like javac to build programs.
Think of three boxes, one inside another. The J D K holds the J R E, and the J R E holds the J V M. A student who writes programs needs the full J D K, because only it has the compiler. In recent Java versions, you just install one J D K, and it includes everything needed to run programs too. BlueJ and NetBeans also need a J D K on the computer.
Here is your first program. Class Hello names the class, and the file must be saved as Hello dot java. The main method is where Java starts running. Public static void main, with String square brackets args, must be typed exactly as shown. System dot out dot println prints the text in double quotes and moves to a new line. So it prints Hello, India.
Many schools use BlueJ, so here are the steps. Create a new project, then click New Class and name it Hello. Double click the class, replace the sample code with ours, and click Compile. Right click the class box and choose void main, String args. Click OK, and Hello, India appears in the Terminal Window.
Other schools use NetBeans, and the steps are just as short. Choose File, New Project, and pick a Java application. Type the print line inside the main method NetBeans creates for you. Click the green Run button, or press Shift and F six to run the current file. The result appears in the Output window at the bottom. NetBeans compiles for you, so there is no separate compile button.
You can also run Java without any editor, from the command prompt. Type javac Hello dot java to compile it. This creates Hello dot class. Then type java Hello, without dot class, and the J V M runs it and prints Hello, India.
Every Java program has the same structure. The class header names the class, and a public class must match the file name. Curly braces open and close each block, and every open brace needs a closing brace. The main method is the starting point of the program. Statements are the instructions inside, and each one ends with a semicolon. Comments start with two slashes, and Java ignores them.
Pause and predict the output. Here the array is named a instead of args, and any name works. Print writes Hi and a space, but stays on the same line. Println writes Java and then moves to a new line. So the output is one line, Hi Java. Also remember, Java is case sensitive, so system with a small s gives a compile error.
Let us revise what we learned today. Java is an object oriented, platform independent language. Javac compiles the dot java source code into dot class bytecode. The J V M runs that bytecode on any operating system. The J D K contains the J R E, and the J R E contains the J V M. And every program starts running at public static void main. Now type the Hello program yourself and print your own name.
Courses that teach this
| Course | Unit |
|---|---|
| CBSE Class 11 Information Technology (802) | Part B, Unit 5: Fundamentals of Java Programming |
| CBSE Class 12 Information Technology (802) | Fundamentals of Java Programming |
| ICSE Class 9 Computer Applications | Introduction to Java |
| ISC Class 12 Computer Science (868) | Implementation (Algorithms to Programs) |
| GSEB Std 12 Computer Studies | Object-Oriented Concepts and Java Basics |
| Programming All levels Java | Object-Oriented Foundations |
Voice-over in this lesson is AI-generated. The script is written and checked by Kajal Ma'am. Boards can revise a syllabus mid-year, so confirm anything you plan around against the official board circular. Keep your passwords, OTPs and ID numbers to yourself — we never ask for them. To reach Kajal Ma'am, use the WhatsApp button; sharing your number there is how we call you back.
Free to watch, no sign-up. Live classes with Kajal Ma'am are the paid course; these lessons stay free either way.

