School Revise · Class 11 Information Technology · Chapter 5
Code 802, Class 11. Java is a popular programming language. Here we write our first Java programs, use variables, and make decisions and loops.
|
|
A Java program lives inside a class and starts running at the main method. System.out.println prints output.
Every Java program has a class and a main method. System.out.println(“…”) prints a line.
|
public class Main { public static void main(String[] args) { System.out.println(“Hello, School Revise”); } } |
Java has data types: int (whole numbers), double (decimals), String (text) and boolean (true or false). Operators include + – * / % and comparisons.
if and else make decisions, and for and while loops repeat work, much like other languages but with braces and semicolons.
Explore the idea by tapping. The interactive opens right here in the lesson.
Type each one into the code lab above, then open the card to see the worked solution and its output.
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
At the main method.
System.out.println().
int.
if.
|
A Java program lives inside a class and starts at the main method; System.out.println prints output. Data types include int, double, String and boolean, with operators + – * / % and comparisons. if and else make decisions, and for and while loops repeat work, using braces and semicolons. |
| Open the Virtual Lab |
These free Class 11 Information Technology (Code 802) notes explain the fundamentals of Java, class and main method, System.out.println, variables and data types, and decisions and loops with worked examples and practice, for CBSE students across India and the Gulf including the UAE, Saudi Arabia, Qatar, Oman, Kuwait and Bahrain.
© 2026 School Revise. All rights reserved. Original content aligned to the CBSE and NCERT Class 11 Information Technology syllabus. Unauthorised copying is not permitted.