0% found this document useful (0 votes)
12 views3 pages

Java Demo Class 1 Hour Outline

Uploaded by

vi8odreddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Java Demo Class 1 Hour Outline

Uploaded by

vi8odreddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Java Demo Class - 1 Hour Plan

Objective

Introduce Java programming to a 12th standard completed student in an engaging and hands-on way.

1-Hour Class Breakdown

0-5 mins: Introduction

- What is Java?

- Where is Java used? (Apps, games, banking, etc.)

5-15 mins: Java Basics

- What is a class?

- What is the main method?

- Sample HelloWorld program

15-30 mins: Variables and Data Types

- int, double, char, String, boolean

- Program example using variables

30-45 mins: Conditional Statements and Loops

- if-else

- for loop

- Examples: voting eligibility, count loop

45-55 mins: Mini Project

- Simple calculator program using variables

55-60 mins: Wrap-up

- Recap

- Q&A

- Next steps and encouragement


Java Demo Class - 1 Hour Plan
Sample Code Snippets

Hello World:

public class HelloWorld {

public static void main(String[] args) {

System.out.println("Hello, world!");

Variables:

public class VariablesDemo {

public static void main(String[] args) {

int age = 18;

String name = "Rahul";

boolean isStudent = true;

System.out.println("Name: " + name);

System.out.println("Age: " + age);

System.out.println("Is Student: " + isStudent);

Conditional:

public class VotingCheck {

public static void main(String[] args) {

int age = 18;

if (age >= 18) {

System.out.println("Eligible to vote.");

} else {

System.out.println("Not eligible to vote.");

}
Java Demo Class - 1 Hour Plan
}

Loop:

public class LoopExample {

public static void main(String[] args) {

for (int i = 1; i <= 5; i++) {

System.out.println("Count: " + i);

Calculator:

public class SimpleCalculator {

public static void main(String[] args) {

int a = 10, b = 5;

System.out.println("Addition: " + (a + b));

System.out.println("Subtraction: " + (a - b));

System.out.println("Multiplication: " + (a * b));

System.out.println("Division: " + (a / b));

Useful Tools for Practicing Java

- OnlineGDB: https://www.onlinegdb.com/online_java_compiler

- JDoodle: https://www.jdoodle.com/java-online/

- Replit: https://replit.com/languages/java10

- Install Java: Oracle JDK + IntelliJ/BlueJ (Optional for future use)

You might also like