SlideShare a Scribd company logo
Learning Java - A Foundational Journey

Explain the structured programming paradigm

Explain the object-oriented programming paradigm

Explain the features of Java as a OOP language

Describe Java platform and its components

List the different editions of Java

Explain the evolution of Java Standard Edition (Java SE)

Describe the steps for downloading and installing Java Development Kit
(JDK)
2
© Aptech Ltd. Introduction to Java/Session 1
Software Applications
• The solution for solving a problem in the field of
information technology is achieved by
developing software applications.
• A software application can be defined as a collection
of programs that are written in high-level
programming languages to solve a particular problem.
3
© Aptech Ltd. Introduction to Java/Session 1

The most prominent use of computers is to solve problems quickly and
accurately.

The solution adopted to solve a problem is provided as a sequence of
instructions or specifications of activity which enables a user to achieve
the desired result.

Knowledge of Domain:
🞛 Plays an important role while developing software applications
🞛 Can be defined as field of business or technology to which a problem belongs
🞛 Figure shows development of software application as a solution for managing various operations in a
banking domain.
4
© Aptech Ltd. Introduction to Java/Session 1

Programming Languages:
🞛 Development of software application is done using a programming language.
🞛 A programming language is used as a medium for communicating instructions to the
computer.
🞛 Programming language enforces a particular style of programming that is referred to
as a programming paradigm.
🞛 Two types of programming paradigm:
Structured
Programming
Paradigm
Object-oriented
Programming
Paradigm
5
© Aptech Ltd. Introduction to Java/Session 1
• In structured programming paradigm, the application development is decomposed
into a hierarchy of subprograms.
• The subprograms are referred to as procedures, functions, or modules in different
structured programming languages.
• Each subprogram is defined to perform a specific task.
• Some of structured programming languages are C, Pascal, and Cobol.

Figure displays bank application activities broken down into subprograms:
Structured Programming
6
© Aptech Ltd. Introduction to Java/Session 1

Main disadvantage of structured programming
languages are as follows:
🞛 Data is shared globally between the
subprograms.
🞛 Efforts are spent on accomplishing the solution rather
than focusing on problem domain.

This often led to a software crisis, as the maintenance
cost of complex applications became high and
availability of reliable software was reduced.
7
© Aptech Ltd. Introduction to Java/Session 1

Growing complexity of software required change in programming style.

Some features that were aimed are:
🞛 Development of reliable software at reduced cost.
🞛 Reduction in the maintenance cost.
🞛 Development of reusable software components.
🞛 Completion of software development with the specified time interval.

These features resulted in the evolution of object-oriented programming paradigm.

Software applications developed using object-oriented programming paradigm are:
🞛 Designed around data, rather than focusing only on functionalities.

Figure shows different activities involved in object-oriented software development:
8
© Aptech Ltd. Introduction to Java/Session 1
Object-oriented Analysis (OOA) phase determines
the functionality of the system.
Object-oriented Design (OOD) phases
determines the process of planning a system in
which objects interact with each other to solve a
software problem.
Object-oriented Programming (OOP) deals with
the actual implementation of the application.

Unified Modeling Language (UML) helps to create visual models in the
system.

The actual implementation of these visual models is done using an OOP
language.
9
© Aptech Ltd. Introduction to Java/Session 1

An OOP language is based on certain principles that are as follows:
Object Represents an entity which possesses certain features and behaviors.
Class Is a template that is used to create objects of that class.
Abstraction Is a design technique that focuses only on the essential features of an entity for a specific problem domain.
Encapsulation Is a mechanism that combines data and implementation details into a single unit called class.
Inheritance
Enables the developer to extend and reuse the features of existing classes and create new classes. The new
classes are referred to as derived classes.
Polymorphism Is the ability of an object to respond to same message in different ways.
10
© Aptech Ltd. Introduction to Java/Session 1

An object represents a real-world entity.

Any tangible or touchable entity in the real-world can be
described as an object.

Figure shows some real-world entities:

Each object has:
🞛 Characteristics – Defined as attributes, properties, or features describing
the object.
🞛 Actions – Defined as activities or operations performed by the
object.

Example of an object, Dog.
🞛 Properties – Breed, Color, and Age
🞛 Actions – Barking, Eating, and Running

The concept of objects in the real-world can be extended to the
programming
world where software ‘objects’ can be defined. 11
© Aptech Ltd. Introduction to Java/Session 1

A software object has state and behavior.

‘State’ refers to object’s characteristics or attributes.

‘Behavior’ of the software object comprises its actions.

Following figure shows a software object, a Car with its state and behavior:

Advantages of using objects are as follows:
1
• They help to understand the real-world.
2
• They map attributes and actions of real-world entities with state and behavior of software
objects.
12
© Aptech Ltd. Introduction to Java/Session 1

In the real-world, several objects:
🞛 Have common state and behavior.
🞛 Can be grouped under a single class.
🞛 Example: All car objects have attributes, such as color, make, or model.

Class:
🞛 Can be defined that a class is a template or blueprint which defines the state and behavior for all
objects belonging to that class.
🞛 Following figure shows a car as a template and a Toyota car as an object or instance of the
class:
13
© Aptech Ltd. Introduction to Java/Session 1

Class comprises fields and methods, collectively called as members.
🞛 Fields – Are variables that depict the state of objects.
🞛 Methods – Are functions that depict behavior of objects.

Following table shows the difference between a class and an object:
14
© Aptech Ltd. Introduction to Java/Session 1
Class Object
Class is a conceptual model Object is a real thing
Class describes an entity Object is the actual entity
Class consists of fields (data members) and
functions
Object is an instance of a class

It is one of the most popular OOP language.

It helps programmers to develop wide range of applications that can run on various
hardware and Operating System (OS).

It is also a platform that creates an environment for executing Java application.

It caters to small-scale to large-scale problems across the Internet.

Java applications are built on variety of platforms that range from:
🞛 Embedded devices to desktop applications
🞛 Web applications to mobile phones
🞛 Large business applications to supercomputers
15
© Aptech Ltd. Introduction to Java/Session 1

The brief timeline of Java is depicted as follows:
Timeline of Java
Since James Gosling was the key member of the team that developed the language, he is known as the father of Java.
16
© Aptech Ltd. Introduction to Java/Session 1
Java Virtual Machine
(JVM)
17
© Aptech Ltd. Introduction to Java/Session 1
• Programming languages, such as C
and C++, translate compiled code
into an executable binary code,
which is machine dependent. JVM
is an execution engine that creates
a platform independent execution
environment for executing Java
compiled code.
Java Runtime
Environment (JRE)
• JRE is also written as Java RTE. The
JRE is a set of software tools that
are used for developing Java
applications. It is used to provide
runtime environment. It is the
implementation of JVM.
Java Development Kit
(JDK)
• JDK is a binary software
development kit released by
Oracle Corporation as part of the
Java platform. It is an
implementation of Java and
distributed for various platforms,
such as Windows, Linux, Mac OS
X, and so on. JDK contains a
private JVM and a few other
resources such as an interpreter, a
compiler (javac), an archiver (jar),
a documentation generator
(Javadoc), and so on.
18
© Aptech Ltd. Introduction to Java/Session 1

OpenJDK refers to a free and open-source implementation of Java.

Oracle JDK has had better performance than OpenJDK.

However, the performance of OpenJDK is growing.

Contributions of the OpenJDK community often outperform Oracle JDK.

Both OpenJDK and Oracle JDK are created and maintained currently by Oracle only.
19
© Aptech Ltd. Introduction to Java/Session 1

Class Data Sharing (CDS) feature helps reduce the startup time and memory footprint
between multiple JVMs.

When you use the installer to install the Oracle JRE, the installer loads a default set of
classes from the system Java Archive (JAR) file into a private internal representation.

The memory for applications comprises two components namely, stack and heap. The
stack is an area in the memory that stores object references and method information.
The heap area of memory deals with dynamic memory allocations.

A portion of the shared archive on the same host is mapped as read-only and shared
among multiple JVM processes.

Application Class-Data Sharing
🞛 Allows application classes to be placed in a shared drive.
🞛 The common class metadata is shared across different Java processes.
🞛 AppCDS allows the built-in system class loader, built-in platform class loader, and custom class
loaders to load the archived classes.
20
© Aptech Ltd. Introduction to Java/Session 1

To download the JDK, follow the link https://www.oracle.com/java/technologies/javase-
jdk15downloads.html.
21
© Aptech Ltd. Introduction to Java/Session 1

To set the PATH variable permanently, add the full path of the jdk-15bin directory to
the PATH variable.

Typically, the full path is:
C:Program FilesJavajdk-15bin To set the PATH variable on Microsoft Windows:

Select Control Panel and then, System.

Click Advanced and then, Environment Variables.

Add the location of the bin folder of the JDK installation to the PATH variable in System
Variables.
22
© Aptech Ltd. Introduction to Java/Session 1

What is Project Graal?
Project Graal was created by Oracle with the ultimate goal of improving JVM based languages performance to
match performance levels that native languages enjoy.

Just-In-Time Compiler - Is a form of dynamic compilation that combines the use of Ahead-Of-Time
(AOT) compilation and interpretation, and thus, has advantages and disadvantages from both
technologies.

Ahead-Of-Time Compilation - Main goal was to improve the start-up time of Java applications with
minimum impact to the application’s peak performance.

Interpretation - It is a process that interprets code and performs specified actions. There are
different ways an interpreter can work: it can parse the code and execute it directly, turn the code
into an intermediate representation and execute that, or it can execute code that has already been
pre-compiled.
23
© Aptech Ltd. Introduction to Java/Session 1
24
© Aptech Ltd. Introduction to Java/Session 1
package
• A package defines a namespace that stores classes with similar
functionalities in them.
import
• The import keyword identifies the classes and packages that are
used in a Java class.
class
• The class keyword identifies a Java class. It precedes the name of
the class in the declaration.
• They represent the state of objects.
Variables
Methods
• Functions that represent some action to be performed on an
object.
Construc
tors
• Methods or functions that are invoked during the creation
of an object.
25
© Aptech Ltd. Introduction to Java/Session 1

Basic requirements to write a Java program are as follows:
1. JDK 15 installed and configured on the system
2. A text editor
The text editor can be any simple editor included with the platforms. For example, the
Windows platform provides a simple text editor named Notepad.
To create, compile, and execute a Java program, perform following steps:
-
Create a Java program
-
Compile .java file
-
Build and execute Java program
Create a Java
program
Compile .java file
Build and execute
Java program
26
© Aptech Ltd. Introduction to Java/Session 1

Step 1: Class Declaration

Step 2: Write the main method

Step 3: Write desired functionality

Step 4: Save the program
27
© Aptech Ltd. Introduction to Java/Session 1
28
© Aptech Ltd. Introduction to Java/Session 1
29
© Aptech Ltd. Introduction to Java/Session 1

NetBeans is an open source written purely in Java.

It is a free and robust IDE that helps developers to create cross-platform
desktop, Web, and mobile applications using Java.

Some benefits of using NetBeans IDE for Java application development are
as follows:
- Builds IDE plug-in modules and supports rich client applications on the NetBeans
platform.
- Provides graphical user interface for building, compiling, debugging, and packaging of
applications.
- Provides simple and user-friendly IDE configuration.
30
© Aptech Ltd. Introduction to Java/Session 1

The NetBeans IDE has following elements and views:
o
Menu Bar
o
Folders View
o
Components View
o
Coding and Design View
o
Output View
31
© Aptech Ltd. Introduction to Java/Session 1
32
© Aptech Ltd. Introduction to Java/Session 1

Comments are placed in a Java program source file.

They are used to document the Java program and are not compiled by the compiler.
They are added as remarks to make the program more readable for the user.

A comment usually describes the operations for better understanding of the code.
There are three styles of comments supported by Java namely, single-line, multi-line, and
Javadoc.
33
© Aptech Ltd. Introduction to Java/Session 1

A single-line comment is used to document the functionality of a single line of code.

There are two ways of using single-line comments that are as follows:
Beginning-of-line comment - This type of comment can be placed before the code (on a
different line).
End-of-line comment - This type of comment is placed at the end of the code (on
the same line). Conventions for using single-line comments are as follows:
- Insert a space after the forward slashes.
- Capitalize the first letter of the first word.
34
© Aptech Ltd. Introduction to Java/Session 1

A multi-line comment is a comment that spans multiple lines.

A multi-line comment starts with a forward slash and an asterisk (/*).

It ends with an asterisk and a forward slash (*/).

Anything that appears between these delimiters is considered to be a
comment.
35
© Aptech Ltd. Introduction to Java/Session 1

A Javadoc comment is used to document public or protected classes,
attributes, and methods.

It starts with /** and ends with */.

Everything between the delimiters is a comment, even if it spans multiple
lines.

The javadoc command can be used for generating Javadoc comments.
36
© Aptech Ltd. Introduction to Java/Session 1

The development of application software is performed using a programming language that enforces a
particular style of programming, also referred to as programming paradigm.

In structured programming paradigm, the application development is decomposed into a hierarchy of
subprograms.

In object-oriented programming paradigm, applications are designed around data, rather than focusing
only on the functionalities.

The main building blocks of an OOP language are classes and objects. An object represents a real-world
entity and a class is a conceptual model.

Java is an OOP language as well a platform used for developing applications that can be executed on
different platforms.

Hidden classes, Z Garbage Collector, Sealed classes, Records, and improved security with Edwards-
Curve Digital Signature algorithm are some of the new features in Java 15.

Apache NetBeans IDE version 12 and higher provide an integrated development environment to create,
compile, and execute Java programs.

The components of Java SE platform are JDK and JRE. JRE provides JVM and Java libraries that are used to
run a Java program. JDK includes the necessary development tools, runtime environment, and APIs for
creating Java programs.
37
© Aptech Ltd. Introduction to Java/Session 1

More Related Content

Similar to Learning Java 1 - Introduction to Java Basic (20)

Introduction to java
Introduction to javaIntroduction to java
Introduction to java
Sujit Majety
 
Java
JavaJava
Java
seenak
 
The history and future of java programming language
The history and future of java programming languageThe history and future of java programming language
The history and future of java programming language
Preeti Agarwal
 
Object Oriented Methodology in Java (Lecture-1)
Object Oriented Methodology in Java (Lecture-1)Object Oriented Methodology in Java (Lecture-1)
Object Oriented Methodology in Java (Lecture-1)
Md. Mujahid Islam
 
introduction to object orinted programming through java
introduction to object orinted programming through javaintroduction to object orinted programming through java
introduction to object orinted programming through java
Parameshwar Maddela
 
1- java
1- java1- java
1- java
Krishna Sujeer
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
CDSukte
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
RajeshSukte1
 
JavaHTP7e_0101_DDP.ppt
JavaHTP7e_0101_DDP.pptJavaHTP7e_0101_DDP.ppt
JavaHTP7e_0101_DDP.ppt
DrTouseefTahir
 
Java Basics
Java BasicsJava Basics
Java Basics
Fahad Shahzad
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Hoang Nguyen
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Fraboni Ec
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Tony Nguyen
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Luis Goldster
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Harry Potter
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Young Alista
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
James Wong
 
Overview of Java
Overview of JavaOverview of Java
Overview of Java
josemachoco
 
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdfPJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
projectfora2
 
JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1
Infoviaan Technologies
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
Sujit Majety
 
The history and future of java programming language
The history and future of java programming languageThe history and future of java programming language
The history and future of java programming language
Preeti Agarwal
 
Object Oriented Methodology in Java (Lecture-1)
Object Oriented Methodology in Java (Lecture-1)Object Oriented Methodology in Java (Lecture-1)
Object Oriented Methodology in Java (Lecture-1)
Md. Mujahid Islam
 
introduction to object orinted programming through java
introduction to object orinted programming through javaintroduction to object orinted programming through java
introduction to object orinted programming through java
Parameshwar Maddela
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
CDSukte
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
RajeshSukte1
 
JavaHTP7e_0101_DDP.ppt
JavaHTP7e_0101_DDP.pptJavaHTP7e_0101_DDP.ppt
JavaHTP7e_0101_DDP.ppt
DrTouseefTahir
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Hoang Nguyen
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Fraboni Ec
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Tony Nguyen
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Luis Goldster
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Harry Potter
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Young Alista
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
James Wong
 
Overview of Java
Overview of JavaOverview of Java
Overview of Java
josemachoco
 
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdfPJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
projectfora2
 

Recently uploaded (20)

Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptxWhat is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
Allomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdfAllomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdf
Abha Pandey
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptxCapitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18
Celine George
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdfFEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18
Celine George
 
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptxRai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Dr. Ravi Shankar Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
Respiratory System , Urinary System
Respiratory  System , Urinary SystemRespiratory  System , Urinary System
Respiratory System , Urinary System
RushiMandali
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptxWhat is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
Allomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdfAllomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdf
Abha Pandey
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptxCapitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18
Celine George
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdfFEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18
Celine George
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
Respiratory System , Urinary System
Respiratory  System , Urinary SystemRespiratory  System , Urinary System
Respiratory System , Urinary System
RushiMandali
 
Ad

Learning Java 1 - Introduction to Java Basic

  • 1. Learning Java - A Foundational Journey
  • 2.  Explain the structured programming paradigm  Explain the object-oriented programming paradigm  Explain the features of Java as a OOP language  Describe Java platform and its components  List the different editions of Java  Explain the evolution of Java Standard Edition (Java SE)  Describe the steps for downloading and installing Java Development Kit (JDK) 2 © Aptech Ltd. Introduction to Java/Session 1
  • 3. Software Applications • The solution for solving a problem in the field of information technology is achieved by developing software applications. • A software application can be defined as a collection of programs that are written in high-level programming languages to solve a particular problem. 3 © Aptech Ltd. Introduction to Java/Session 1  The most prominent use of computers is to solve problems quickly and accurately.  The solution adopted to solve a problem is provided as a sequence of instructions or specifications of activity which enables a user to achieve the desired result.
  • 4.  Knowledge of Domain: 🞛 Plays an important role while developing software applications 🞛 Can be defined as field of business or technology to which a problem belongs 🞛 Figure shows development of software application as a solution for managing various operations in a banking domain. 4 © Aptech Ltd. Introduction to Java/Session 1
  • 5.  Programming Languages: 🞛 Development of software application is done using a programming language. 🞛 A programming language is used as a medium for communicating instructions to the computer. 🞛 Programming language enforces a particular style of programming that is referred to as a programming paradigm. 🞛 Two types of programming paradigm: Structured Programming Paradigm Object-oriented Programming Paradigm 5 © Aptech Ltd. Introduction to Java/Session 1
  • 6. • In structured programming paradigm, the application development is decomposed into a hierarchy of subprograms. • The subprograms are referred to as procedures, functions, or modules in different structured programming languages. • Each subprogram is defined to perform a specific task. • Some of structured programming languages are C, Pascal, and Cobol.  Figure displays bank application activities broken down into subprograms: Structured Programming 6 © Aptech Ltd. Introduction to Java/Session 1
  • 7.  Main disadvantage of structured programming languages are as follows: 🞛 Data is shared globally between the subprograms. 🞛 Efforts are spent on accomplishing the solution rather than focusing on problem domain.  This often led to a software crisis, as the maintenance cost of complex applications became high and availability of reliable software was reduced. 7 © Aptech Ltd. Introduction to Java/Session 1
  • 8.  Growing complexity of software required change in programming style.  Some features that were aimed are: 🞛 Development of reliable software at reduced cost. 🞛 Reduction in the maintenance cost. 🞛 Development of reusable software components. 🞛 Completion of software development with the specified time interval.  These features resulted in the evolution of object-oriented programming paradigm.  Software applications developed using object-oriented programming paradigm are: 🞛 Designed around data, rather than focusing only on functionalities.  Figure shows different activities involved in object-oriented software development: 8 © Aptech Ltd. Introduction to Java/Session 1
  • 9. Object-oriented Analysis (OOA) phase determines the functionality of the system. Object-oriented Design (OOD) phases determines the process of planning a system in which objects interact with each other to solve a software problem. Object-oriented Programming (OOP) deals with the actual implementation of the application.  Unified Modeling Language (UML) helps to create visual models in the system.  The actual implementation of these visual models is done using an OOP language. 9 © Aptech Ltd. Introduction to Java/Session 1
  • 10.  An OOP language is based on certain principles that are as follows: Object Represents an entity which possesses certain features and behaviors. Class Is a template that is used to create objects of that class. Abstraction Is a design technique that focuses only on the essential features of an entity for a specific problem domain. Encapsulation Is a mechanism that combines data and implementation details into a single unit called class. Inheritance Enables the developer to extend and reuse the features of existing classes and create new classes. The new classes are referred to as derived classes. Polymorphism Is the ability of an object to respond to same message in different ways. 10 © Aptech Ltd. Introduction to Java/Session 1
  • 11.  An object represents a real-world entity.  Any tangible or touchable entity in the real-world can be described as an object.  Figure shows some real-world entities:  Each object has: 🞛 Characteristics – Defined as attributes, properties, or features describing the object. 🞛 Actions – Defined as activities or operations performed by the object.  Example of an object, Dog. 🞛 Properties – Breed, Color, and Age 🞛 Actions – Barking, Eating, and Running  The concept of objects in the real-world can be extended to the programming world where software ‘objects’ can be defined. 11 © Aptech Ltd. Introduction to Java/Session 1
  • 12.  A software object has state and behavior.  ‘State’ refers to object’s characteristics or attributes.  ‘Behavior’ of the software object comprises its actions.  Following figure shows a software object, a Car with its state and behavior:  Advantages of using objects are as follows: 1 • They help to understand the real-world. 2 • They map attributes and actions of real-world entities with state and behavior of software objects. 12 © Aptech Ltd. Introduction to Java/Session 1
  • 13.  In the real-world, several objects: 🞛 Have common state and behavior. 🞛 Can be grouped under a single class. 🞛 Example: All car objects have attributes, such as color, make, or model.  Class: 🞛 Can be defined that a class is a template or blueprint which defines the state and behavior for all objects belonging to that class. 🞛 Following figure shows a car as a template and a Toyota car as an object or instance of the class: 13 © Aptech Ltd. Introduction to Java/Session 1
  • 14.  Class comprises fields and methods, collectively called as members. 🞛 Fields – Are variables that depict the state of objects. 🞛 Methods – Are functions that depict behavior of objects.  Following table shows the difference between a class and an object: 14 © Aptech Ltd. Introduction to Java/Session 1 Class Object Class is a conceptual model Object is a real thing Class describes an entity Object is the actual entity Class consists of fields (data members) and functions Object is an instance of a class
  • 15.  It is one of the most popular OOP language.  It helps programmers to develop wide range of applications that can run on various hardware and Operating System (OS).  It is also a platform that creates an environment for executing Java application.  It caters to small-scale to large-scale problems across the Internet.  Java applications are built on variety of platforms that range from: 🞛 Embedded devices to desktop applications 🞛 Web applications to mobile phones 🞛 Large business applications to supercomputers 15 © Aptech Ltd. Introduction to Java/Session 1
  • 16.  The brief timeline of Java is depicted as follows: Timeline of Java Since James Gosling was the key member of the team that developed the language, he is known as the father of Java. 16 © Aptech Ltd. Introduction to Java/Session 1
  • 17. Java Virtual Machine (JVM) 17 © Aptech Ltd. Introduction to Java/Session 1 • Programming languages, such as C and C++, translate compiled code into an executable binary code, which is machine dependent. JVM is an execution engine that creates a platform independent execution environment for executing Java compiled code. Java Runtime Environment (JRE) • JRE is also written as Java RTE. The JRE is a set of software tools that are used for developing Java applications. It is used to provide runtime environment. It is the implementation of JVM. Java Development Kit (JDK) • JDK is a binary software development kit released by Oracle Corporation as part of the Java platform. It is an implementation of Java and distributed for various platforms, such as Windows, Linux, Mac OS X, and so on. JDK contains a private JVM and a few other resources such as an interpreter, a compiler (javac), an archiver (jar), a documentation generator (Javadoc), and so on.
  • 18. 18 © Aptech Ltd. Introduction to Java/Session 1
  • 19.  OpenJDK refers to a free and open-source implementation of Java.  Oracle JDK has had better performance than OpenJDK.  However, the performance of OpenJDK is growing.  Contributions of the OpenJDK community often outperform Oracle JDK.  Both OpenJDK and Oracle JDK are created and maintained currently by Oracle only. 19 © Aptech Ltd. Introduction to Java/Session 1
  • 20.  Class Data Sharing (CDS) feature helps reduce the startup time and memory footprint between multiple JVMs.  When you use the installer to install the Oracle JRE, the installer loads a default set of classes from the system Java Archive (JAR) file into a private internal representation.  The memory for applications comprises two components namely, stack and heap. The stack is an area in the memory that stores object references and method information. The heap area of memory deals with dynamic memory allocations.  A portion of the shared archive on the same host is mapped as read-only and shared among multiple JVM processes.  Application Class-Data Sharing 🞛 Allows application classes to be placed in a shared drive. 🞛 The common class metadata is shared across different Java processes. 🞛 AppCDS allows the built-in system class loader, built-in platform class loader, and custom class loaders to load the archived classes. 20 © Aptech Ltd. Introduction to Java/Session 1
  • 21.  To download the JDK, follow the link https://www.oracle.com/java/technologies/javase- jdk15downloads.html. 21 © Aptech Ltd. Introduction to Java/Session 1
  • 22.  To set the PATH variable permanently, add the full path of the jdk-15bin directory to the PATH variable.  Typically, the full path is: C:Program FilesJavajdk-15bin To set the PATH variable on Microsoft Windows:  Select Control Panel and then, System.  Click Advanced and then, Environment Variables.  Add the location of the bin folder of the JDK installation to the PATH variable in System Variables. 22 © Aptech Ltd. Introduction to Java/Session 1
  • 23.  What is Project Graal? Project Graal was created by Oracle with the ultimate goal of improving JVM based languages performance to match performance levels that native languages enjoy.  Just-In-Time Compiler - Is a form of dynamic compilation that combines the use of Ahead-Of-Time (AOT) compilation and interpretation, and thus, has advantages and disadvantages from both technologies.  Ahead-Of-Time Compilation - Main goal was to improve the start-up time of Java applications with minimum impact to the application’s peak performance.  Interpretation - It is a process that interprets code and performs specified actions. There are different ways an interpreter can work: it can parse the code and execute it directly, turn the code into an intermediate representation and execute that, or it can execute code that has already been pre-compiled. 23 © Aptech Ltd. Introduction to Java/Session 1
  • 24. 24 © Aptech Ltd. Introduction to Java/Session 1
  • 25. package • A package defines a namespace that stores classes with similar functionalities in them. import • The import keyword identifies the classes and packages that are used in a Java class. class • The class keyword identifies a Java class. It precedes the name of the class in the declaration. • They represent the state of objects. Variables Methods • Functions that represent some action to be performed on an object. Construc tors • Methods or functions that are invoked during the creation of an object. 25 © Aptech Ltd. Introduction to Java/Session 1
  • 26.  Basic requirements to write a Java program are as follows: 1. JDK 15 installed and configured on the system 2. A text editor The text editor can be any simple editor included with the platforms. For example, the Windows platform provides a simple text editor named Notepad. To create, compile, and execute a Java program, perform following steps: - Create a Java program - Compile .java file - Build and execute Java program Create a Java program Compile .java file Build and execute Java program 26 © Aptech Ltd. Introduction to Java/Session 1
  • 27.  Step 1: Class Declaration  Step 2: Write the main method  Step 3: Write desired functionality  Step 4: Save the program 27 © Aptech Ltd. Introduction to Java/Session 1
  • 28. 28 © Aptech Ltd. Introduction to Java/Session 1
  • 29. 29 © Aptech Ltd. Introduction to Java/Session 1
  • 30.  NetBeans is an open source written purely in Java.  It is a free and robust IDE that helps developers to create cross-platform desktop, Web, and mobile applications using Java.  Some benefits of using NetBeans IDE for Java application development are as follows: - Builds IDE plug-in modules and supports rich client applications on the NetBeans platform. - Provides graphical user interface for building, compiling, debugging, and packaging of applications. - Provides simple and user-friendly IDE configuration. 30 © Aptech Ltd. Introduction to Java/Session 1
  • 31.  The NetBeans IDE has following elements and views: o Menu Bar o Folders View o Components View o Coding and Design View o Output View 31 © Aptech Ltd. Introduction to Java/Session 1
  • 32. 32 © Aptech Ltd. Introduction to Java/Session 1
  • 33.  Comments are placed in a Java program source file.  They are used to document the Java program and are not compiled by the compiler. They are added as remarks to make the program more readable for the user.  A comment usually describes the operations for better understanding of the code. There are three styles of comments supported by Java namely, single-line, multi-line, and Javadoc. 33 © Aptech Ltd. Introduction to Java/Session 1
  • 34.  A single-line comment is used to document the functionality of a single line of code.  There are two ways of using single-line comments that are as follows: Beginning-of-line comment - This type of comment can be placed before the code (on a different line). End-of-line comment - This type of comment is placed at the end of the code (on the same line). Conventions for using single-line comments are as follows: - Insert a space after the forward slashes. - Capitalize the first letter of the first word. 34 © Aptech Ltd. Introduction to Java/Session 1
  • 35.  A multi-line comment is a comment that spans multiple lines.  A multi-line comment starts with a forward slash and an asterisk (/*).  It ends with an asterisk and a forward slash (*/).  Anything that appears between these delimiters is considered to be a comment. 35 © Aptech Ltd. Introduction to Java/Session 1
  • 36.  A Javadoc comment is used to document public or protected classes, attributes, and methods.  It starts with /** and ends with */.  Everything between the delimiters is a comment, even if it spans multiple lines.  The javadoc command can be used for generating Javadoc comments. 36 © Aptech Ltd. Introduction to Java/Session 1
  • 37.  The development of application software is performed using a programming language that enforces a particular style of programming, also referred to as programming paradigm.  In structured programming paradigm, the application development is decomposed into a hierarchy of subprograms.  In object-oriented programming paradigm, applications are designed around data, rather than focusing only on the functionalities.  The main building blocks of an OOP language are classes and objects. An object represents a real-world entity and a class is a conceptual model.  Java is an OOP language as well a platform used for developing applications that can be executed on different platforms.  Hidden classes, Z Garbage Collector, Sealed classes, Records, and improved security with Edwards- Curve Digital Signature algorithm are some of the new features in Java 15.  Apache NetBeans IDE version 12 and higher provide an integrated development environment to create, compile, and execute Java programs.  The components of Java SE platform are JDK and JRE. JRE provides JVM and Java libraries that are used to run a Java program. JDK includes the necessary development tools, runtime environment, and APIs for creating Java programs. 37 © Aptech Ltd. Introduction to Java/Session 1

Editor's Notes

  • #2: -paradigm: Mô hình -features: Tính năng
  • #3: Công dụng nổi bật nhất của máy tính là giải quyết vấn đề một cách nhanh chóng và chính xác. Giải pháp được áp dụng để giải quyết vấn đề được cung cấp dưới dạng một chuỗi các hướng dẫn hoặc thông số kỹ thuật của hoạt động cho phép người dùng đạt được kết quả mong muốn. Giải pháp để giải quyết một vấn đề trong lĩnh vực công nghệ thông tin đạt được bằng cách phát triển các ứng dụng phần mềm. Một ứng dụng phần mềm có thể được định nghĩa là một tập hợp các chương trình được viết bằng ngôn ngữ lập trình cấp cao để giải quyết một vấn đề cụ thể.
  • #4: Kiến thức về miền: 🞛 Đóng vai trò quan trọng trong khi phát triển các ứng dụng phần mềm 🞛 Có thể được định nghĩa là lĩnh vực kinh doanh hoặc công nghệ mà vấn đề thuộc về 🞛 Hình minh họa sự phát triển của ứng dụng phần mềm như một giải pháp để quản lý các hoạt động khác nhau trong một miền ngân hàng.
  • #5: Ngôn ngữ lập trình: 🞛 Phát triển ứng dụng phần mềm được thực hiện bằng ngôn ngữ lập trình. 🞛 Ngôn ngữ lập trình được sử dụng như một phương tiện để truyền đạt hướng dẫn đến máy tính. 🞛 Ngôn ngữ lập trình áp dụng một phong cách lập trình cụ thể được gọi là mô hình lập trình. 🞛 Hai loại mô hình lập trình:
  • #6: Trong mô hình lập trình có cấu trúc, quá trình phát triển ứng dụng được phân chia thành một hệ thống phân cấp các chương trình con. Các chương trình con được gọi là các thủ tục, hàm hoặc mô-đun trong các ngôn ngữ lập trình có cấu trúc khác nhau. Mỗi chương trình con được xác định để thực hiện một nhiệm vụ cụ thể. Một số ngôn ngữ lập trình có cấu trúc là C, Pascal và Cobol.
  • #7: Nhược điểm chính của ngôn ngữ lập trình có cấu trúc như sau: 🞛 Dữ liệu được chia sẻ toàn cầu giữa các chương trình con. 🞛 Nỗ lực được dành cho việc hoàn thành giải pháp thay vì tập trung vào phạm vi vấn đề. Điều này thường dẫn đến khủng hoảng phần mềm vì chi phí bảo trì các ứng dụng phức tạp trở nên cao và tính khả dụng của phần mềm đáng tin cậy bị giảm.
  • #8: Sự phức tạp ngày càng tăng của phần mềm đòi hỏi phải thay đổi phong cách lập trình. Một số tính năng được nhắm đến là: 🞛 Phát triển phần mềm đáng tin cậy với chi phí thấp hơn. 🞛 Giảm chi phí bảo trì. 🞛 Phát triển các thành phần phần mềm có thể tái sử dụng. 🞛 Hoàn thành phát triển phần mềm trong khoảng thời gian đã chỉ định. Những tính năng này dẫn đến sự phát triển của mô hình lập trình hướng đối tượng. Các ứng dụng phần mềm được phát triển bằng mô hình lập trình hướng đối tượng là: 🞛 Được thiết kế xung quanh dữ liệu, thay vì chỉ tập trung vào chức năng. Hình minh họa các hoạt động khác nhau liên quan đến phát triển phần mềm hướng đối tượng:
  • #9: Giai đoạn Phân tích hướng đối tượng (OOA) xác định chức năng của hệ thống. Giai đoạn Thiết kế hướng đối tượng (OOD) xác định quy trình lập kế hoạch cho một hệ thống trong đó các đối tượng tương tác với nhau để giải quyết vấn đề phần mềm. Lập trình hướng đối tượng (OOP) xử lý việc triển khai thực tế của ứng dụng. Ngôn ngữ mô hình hóa thống nhất (UML) giúp tạo ra các mô hình trực quan trong hệ thống. Việc triển khai thực tế các mô hình trực quan này được thực hiện bằng ngôn ngữ OOP.
  • #10: - Biểu diễn một thực thể sở hữu một số tính năng và hành vi nhất định. - Là một mẫu được sử dụng để tạo các đối tượng của lớp đó. - Là một kỹ thuật thiết kế chỉ tập trung vào các tính năng thiết yếu của một thực thể cho một miền vấn đề cụ thể. - Là một cơ chế kết hợp dữ liệu và chi tiết triển khai thành một đơn vị duy nhất được gọi là lớp. - Cho phép nhà phát triển mở rộng và tái sử dụng các tính năng của các lớp hiện có và tạo các lớp mới. Các lớp mới được gọi là lớp dẫn xuất. - Là khả năng của một đối tượng để phản hồi cùng một thông báo theo những cách khác nhau.
  • #11: Một đối tượng đại diện cho một thực thể trong thế giới thực. Bất kỳ thực thể hữu hình hoặc có thể chạm vào nào trong thế giới thực đều có thể được mô tả là một đối tượng. Hình minh họa một số thực thể trong thế giới thực: Mỗi đối tượng có: 🞛 Đặc điểm – Được định nghĩa là các thuộc tính, tính chất hoặc đặc điểm mô tả đối tượng. 🞛 Hành động – Được định nghĩa là các hoạt động hoặc thao tác do đối tượng thực hiện. Ví dụ về một đối tượng, Chó. 🞛 Thuộc tính – Giống, Màu sắc và Độ tuổi 🞛 Hành động – Sủa, Ăn và Chạy Khái niệm về các đối tượng trong thế giới thực có thể được mở rộng sang thế giới lập trình, nơi có thể định nghĩa 'đối tượng' phần mềm.
  • #12: Một đối tượng phần mềm có trạng thái và hành vi. ‘Trạng thái’ đề cập đến các đặc điểm hoặc thuộc tính của đối tượng. ‘Hành vi’ của đối tượng phần mềm bao gồm các hành động của nó. Hình sau đây cho thấy một đối tượng phần mềm, một chiếc xe với trạng thái và hành vi của nó:
  • #13: Trong thế giới thực, một số đối tượng: 🞛 Có trạng thái và hành vi chung. 🞛 Có thể được nhóm lại thành một lớp duy nhất. 🞛 Ví dụ: Tất cả các đối tượng ô tô đều có các thuộc tính, chẳng hạn như màu sắc, nhãn hiệu hoặc kiểu máy. Lớp: 🞛 Có thể định nghĩa rằng một lớp là một mẫu hoặc bản thiết kế xác định trạng thái và hành vi cho tất cả các đối tượng thuộc về lớp đó. 🞛 Hình sau đây cho thấy một chiếc ô tô là một mẫu và một chiếc ô tô Toyota là một đối tượng hoặc thể hiện của lớp:
  • #14: Lớp bao gồm các trường và phương thức, được gọi chung là thành viên. 🞛 Trường – Là các biến mô tả trạng thái của các đối tượng. 🞛 Phương thức – Là các hàm mô tả hành vi của các đối tượng.
  • #15: Đây là một trong những ngôn ngữ OOP phổ biến nhất. Nó giúp các lập trình viên phát triển nhiều loại ứng dụng có thể chạy trên nhiều phần cứng và Hệ điều hành (OS) khác nhau. Đây cũng là một nền tảng tạo ra môi trường để thực thi ứng dụng Java. Nó đáp ứng các vấn đề từ quy mô nhỏ đến quy mô lớn trên Internet. Các ứng dụng Java được xây dựng trên nhiều nền tảng khác nhau, từ: 🞛 Thiết bị nhúng đến ứng dụng máy tính để bàn 🞛 Ứng dụng web đến điện thoại di động 🞛 Ứng dụng doanh nghiệp lớn đến siêu máy tính
  • #20: Tính năng Chia sẻ dữ liệu lớp (CDS) giúp giảm thời gian khởi động và dung lượng bộ nhớ giữa nhiều JVM. Khi bạn sử dụng trình cài đặt để cài đặt Oracle JRE, trình cài đặt sẽ tải một tập hợp các lớp mặc định từ tệp Lưu trữ Java (JAR) của hệ thống vào một biểu diễn nội bộ riêng tư. Bộ nhớ cho các ứng dụng bao gồm hai thành phần, cụ thể là ngăn xếp và đống. Ngăn xếp là một vùng trong bộ nhớ lưu trữ các tham chiếu đối tượng và thông tin phương thức. Vùng đống của bộ nhớ xử lý các phân bổ bộ nhớ động. Một phần của kho lưu trữ được chia sẻ trên cùng một máy chủ được ánh xạ thành chỉ đọc và được chia sẻ giữa nhiều quy trình JVM. Chia sẻ dữ liệu lớp ứng dụng 🞛 Cho phép các lớp ứng dụng được đặt trong một ổ đĩa được chia sẻ. 🞛 Siêu dữ liệu lớp chung được chia sẻ trên các quy trình Java khác nhau. 🞛 AppCDS cho phép trình tải lớp hệ thống tích hợp, trình tải lớp nền tảng tích hợp và trình tải lớp tùy chỉnh tải các lớp đã lưu trữ.