0% found this document useful (0 votes)
43 views

Java Lecture 1 PDF

The document introduces Java programming by discussing how to install Java and provides an example of a first Java program. It explains that a function takes input, performs operations, and returns output. Methods are functions stored in classes. The document also defines a class as a group of objects that share properties and can have properties and methods. It then shows a simple "Hello World" Java program as an example, with a main method in the Main class that prints "Hello World".

Uploaded by

shabbir mia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Java Lecture 1 PDF

The document introduces Java programming by discussing how to install Java and provides an example of a first Java program. It explains that a function takes input, performs operations, and returns output. Methods are functions stored in classes. The document also defines a class as a group of objects that share properties and can have properties and methods. It then shows a simple "Hello World" Java program as an example, with a main method in the Main class that prints "Hello World".

Uploaded by

shabbir mia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Java - Introduction to Programming

Lecture 1

Installation & First Program

1. Install Java
a. Install JDK (https://www.oracle.com/in/java/technologies/javase-downloads.html)
b. Install IntelliJ (https://www.jetbrains.com/idea/download/#section=mac)
OR
b. Install Visual Studio Code (VS Code) - Prefer THIS
(https://code.visualstudio.com/download)

2. Sample Code
Functions
A function is a block of code which takes some input, performs some operations
and returns some output.
The functions stored inside classes are called methods.
The function we have used is called main.

Class
A class is a group of objects which have common properties. A class can have
some properties and functions (called methods).
The class we have used is Main.

3. Our 1st Program


public class Main {

public static void main(String[] args) {


// Our 1st Program
System.out.println("Hello World");
}
}

Apna College

You might also like