0% found this document useful (0 votes)
13 views20 pages

Presentation lesson 3.pptx

This document outlines the third session of a course on Object-Oriented Programming using Java, focusing on setting up the Java development environment and writing simple Java programs. Students will learn to install and configure the JDK, create a basic Java program, and verify their installation. The session includes interactive learning activities and discussions to reinforce key concepts.

Uploaded by

Yamini Singh
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)
13 views20 pages

Presentation lesson 3.pptx

This document outlines the third session of a course on Object-Oriented Programming using Java, focusing on setting up the Java development environment and writing simple Java programs. Students will learn to install and configure the JDK, create a basic Java program, and verify their installation. The session includes interactive learning activities and discussions to reinforce key concepts.

Uploaded by

Yamini Singh
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/ 20

Setting up Java Environment,

Writing & Running Java


Programs

Session No.: 3
Course Name: OOPS using Java
Course Code:R1UC201C
Duration: 50 minutes
Date of Conduction of Class: 06-03-2025

Galgotias University 1
Insert Review of the key concepts of session
no. 2
JVM VS JDK VS JRE

Galgotias University 2
Can we run a Java program without
setting up anything? Why or why not?

Galgotias University 3
At the end of this session students will be able
to

Set up the Java Development


Environment – Install and configure JDK
& an IDE (e.g., Eclipse, IntelliJ, VS Code).

Write a Simple Java Program –


Create and save a basic Java
program (HelloWorld.java).
Galgotias University 4
1 Introduction to JDK

2 Downloading JDK

3 Installing JDK on Windows


Session
Outline 4 Setting Up Environment Variables
(Windows)
5 Verifying the Installation

6 Compiling & Running Java Code

Galgotias University 5
Galgotias University 6
Galgotias University 7
Galgotias University 8
Galgotias University 9
Galgotias University 10
Galgotias University 11
Galgotias University 12
Learning Activity 1

Students pair up; one follows installation


steps while the other guides. They switch
roles after completing setup.

GSCALE full form and date 13


Reflection-
Learning Activity 1

Installation of JDK in student’s system

Galgotias University 14
Concept and
Definition for
Learning Activity 2
∙ Instructor writes a simple program on screen:
public class HelloJava {
public static void main(String[] args) {
System.out.println("Hello, Java!");
}
}
∙ Students type the code, modify the output message, and
add a second print statement.

Galgotias University 15
Learning Activity 2
1. Write code to print hello world
2. Write a code to print name

Galgotias University 16
Ensure attainment of LOs in alignment
to the learning activities: outcomes
(1-2)

Install and configure JDK

Create and save a basic


Java program
Galgotias University 17
Discussion on the post session activities
1. What command do you use to check if Java is installed on your
system?
a) check java
b) java -version
c) run java
d) javac run
2. Which file extension is used for a compiled Java program?
a) .java
b) .exe
c) .class
d) .txt
3. If you try to run a Java program and get an error like "javac:
command not found", what could be the possible reason?
a) Java is not installed
b) The PATH environment variable is not set correctly
c) The file is missing a main method
d) Both a and b

Galgotias University 18
Information about the next
lesson

Java fundamentals: Variables, Data


Types, Operators, & Keywords

Galgotias University 19
Thank You

Galgotias University 20

You might also like