OOPS-JAVA
BY
Dr. Sahinur Rahman Laskar
Assistant Professor
SoCS, UPES
Introduction
● Java is a popular object oriented programming language.
● Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995. James
Gosling is known as the father of Java.
● Application:
➔ Mobile applications
➔ Desktop applications
➔ Web applications
➔ Web servers and application servers
➔ Games
Introduction
Why Use Java?
● Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
● It is one of the most popular programming language in the world
● It has a large demand in the current job market
● It is easy to learn and simple to use
● It is open-source and free
● It is secure, fast and powerful
● It has a huge community support (tens of millions of developers)
● Java is an object oriented language which gives a clear structure to programs and allows code to be
reused, lowering development costs
Introduction
● Java Programs are compiled to Java byte-codes, a kind of machine independent representation. This
program is then executed by an interpreter called the Java Virtual Machine (JVM).
Introduction
● Compiled Code is independent of the architecture of the computer.
Introduction
● A compiler translates code written in a high-level programming language into a lower-level language like
assembly language, object code and machine code (binary 1 and 0 bits). It converts the code ahead of time
before the program runs.
● An interpreter translates the code line-by-line when the program is running.
Introduction
Installation
● Install JDK. Open Command Prompt (cmd.exe) and type java -version to see if Java is running on your
machine.
● Install text editor (NotePad++) (For writing Java Code)
Run First Program
public class hello {
public static void main(String[] args) {
System.out.println("Hello World");
1. Save the file (hello.java) 2. Open the directory where the file is saved. 3. Open CMD (terminal)
4. Then type: javac hello.java → Enter → java hello