0% found this document useful (0 votes)
1 views17 pages

Introduction To JavaSE

Uploaded by

zmarn5590
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)
1 views17 pages

Introduction To JavaSE

Uploaded by

zmarn5590
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

Java Beginner to Master Class

Dr. Yadanar Oo (Ph.D (IT))


Lecturer(UCSY)

[Link] Oo (ITech Education Founder)


Introduction to JavaSE

[Link] Oo (ITech Education Founder)


Introduction to OOP

• Object-oriented programming (OOP)


A computer programming model that organizes software design around data, or
objects, rather than functions and logic.
• Object
An object is an entity which has states and behaviors.
An object is an instance of a class.
• Class
A class can be defined as a template that describes the behaviors or states that
the object of its type support.

[Link] Oo (ITech Education Founder)


Structure Programming Vs OOP

Structure Programming Object Oriented Programming

Top to Bottom Design Object focused design

Moderately complex program Very complex program

Less data security More security

Less flexible More flexible

Less reusability More reusability

[Link] Oo (ITech Education Founder)


Introduction to

• Java is an object-oriented programming language with a built-in application


programming interface (API) that can handle graphics and user interfaces and that can
be used to create applications or applets.

• Because of its rich set of API's, and its platform independence, Java can also be thought
of as a platform in itself.

• Much of the syntax of Java is the same as C and C++. One major difference is that Java
does not have pointers.

• However, the biggest difference is that you must write object oriented code in Java.

[Link] Oo (ITech Education Founder)


History of Java

• Java was started as a project called "Oak" by James Gosling in June 1991.

• Java was developed by Sun Microsystems (which is now the subsidiary of


Oracle) in the year 1995.

• First major JDK (Java Development Kit) 1.0 was released on January 21, 1996.

• James Gosling is known as the father of Java.

• Java is intended to let programmers “Write Once, Run Anywhere” (WORA)

• The latest java version is Java SE Development Kit 21 (JDK 21) released on 19
September 2023.

[Link] Oo (ITech Education Founder)


Editions of Java

• J2ME (Java 2 Micro Edition)


J2ME is aimed at those producing embedded code for embedded systems,
mobiles and small devices.

• J2SE (Java 2 Standard Edition)


It’s the purest form of Java, a basic foundation for all other editions.
J2SE is aimed at creating applications for Desktop environment.

• J2EE (Java 2 Enterprise Edition)


J2EE is aimed at those producing distributed enterprise applications.
It has a much larger usage of Java like development of web services,
networking, server side scripting and other various web based applications.

[Link] Oo (ITech Education Founder)


Benefits of Java

• Get started quickly: Although the Java programming language is a powerful object-
oriented language, it's easy to learn, especially for programmers already familiar with C
or C++.
• Write better code: The Java programming language encourages good coding
practices, and automatic garbage collection helps you avoid memory leaks.
• Avoid platform dependencies: You can keep your program portable by avoiding the
use of libraries written in other languages.
• Write once, run anywhere: Because applications written in the Java programming
language are compiled into machine independent bytecodes, they run consistently on
any Java platform.
• Object-oriented : You can create modular programs and reusable code.

[Link] Oo (ITech Education Founder)


Java’s Features

The Java programming language is a high-level language that can be


characterized by all of the following features:

• Simple • Architecture neutral


• Object-oriented
• Portable
• Distributed
• High performance
• Interpreted
• Robust • Dynamic

• Secure

[Link] Oo (ITech Education Founder)


The Java platform
• A platform is the hardware or software environment in which a program runs
• Microsoft Windows, Linux and Mac OS
• The Java platform has two components:
• The Java Virtual Machine
• The Java Application Programming Interface (API)

[Link] Oo (ITech Education Founder)


What is JDK?
• Java Development Kit is an environment of software development used for developing
Java applications.

• One can easily install more than one version of JDK on the same computer.

• The Java developers can make use of it on macOS, Windows and Linux.

• JDK assists them in coding and running the Java programs.

• JDK is a kit(or package) that includes two things

• Development Tools(Java Debugger, JavaDoc, compilers,)

• JRE (to execute your java program).

[Link] Oo (ITech Education Founder)


What is JRE?

• The Java Runtime Environment (JRE) is an implementation of JVM.

• It is a type of software package that provides class libraries of Java, JVM, and various
other components for running the applications written in Java programming.

• All the versions of JDK come bundled up with the JRE (Java Runtime Environment).

[Link] Oo (ITech Education Founder)


What is JVM?

• Java Virtual Machine(JVM) provides a runtime environment for driving Java applications
or code.

• JVM is an abstract machine that converts the Java bytecode into a machine language.

[Link] Oo (ITech Education Founder)


Difference Between JDK, JRE, JVM

JVM= Only the


runtime
environment JRE = Libraries for running the
that helps in application + JVM (Java Virtual
executing the Machine)
Java bytecode

JDK = Development Tools + JRE (Java Runtime Environment)

[Link] Oo (ITech Education Founder)


Java Compilation & Executing

[Link] Oo (ITech Education Founder)


Java File & Class File

Java File

Class File

[Link] Oo (ITech Education Founder)


Compilation & Decompilation
• Compilation

• source code is compiled into an intermediate stack-based representation known as


bytecode, which is interpreted by the Java Virtual Machine (JVM).

• Decompilation

• The decompilation is exactly the reverse process of compilation

• A Java Decompiler is a special type of decompiler which takes a class file as input
and produces Java source code as output.

• Decompiler does not produce a replica of the source code.

• It is because a bit of information lost from the source code during the compilation
of the program. [Link] Oo (ITech Education Founder)

You might also like