SlideShare a Scribd company logo
JAVA PROGRAMMING
By:
SADIQ AMINZAI
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
1
CONTENTS
 Introduction to Java
 Why Java is important?
 What is Java?
 Characteristics of Java
 Java Environment
 JDK Evolution…
 Java Editions
 WORA (Write Once Run Anywhere)
 Applications of Java
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
2
INTRODUCTION TO JAVA
 Java is a Programming Language.
 It was originally developed by SUN MICROSYSTEM.
 It is created by James Gosling.
 James Gosling was unhappy using C++ programing so he developed Java.
 They developed a platform independent software based on the power of
networks that can run on different application areas, such as computers and electronic
devices.
 It was initially called ‘Oak’.
 It was renamed as ‘JAVA’ released in 1995 as a core component of
Sun Microsystems Java Platform.
James
Gosling
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
3
WHY JAVA IS IMPORTANT?
Two reasons:
1) Trouble with C/C++ language is that they are not portable and are not platform
independent languages
2) Emergence of World Wide Web (WWW), which demanded portable programs.
 Portability and security necessitated the invention of Java.
 Note: A portable application (also called as standalone app) is a software product
designed to be easily moved from one computing environment to another.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
4
WHAT IS JAVA?
 A general purpose object-oriented language.
 Write Once Run Anywhere (WORA).
 Designed for easy Web/Internet applications.
 Widespread acceptance.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
5
CHARACTERISTICS OF JAVA
 Java is simple.
 Java is object-oriented.
 Java is distributed.
 Java is interpreted.
 Java is portable.
 Java is robust.
 Java is secure.
 Java is multithreaded.
 Java is dynamic.
 Java is architectural-neutral.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
6
JAVA IS SIMPLE
 Java was designed to be simple and familiar to
learn languages.
 Fundamental concepts can be grasped quickly as
the features borrowed
from C and C++.
 Featured were removed that led to poor
programming practices or were
rarely used.
 It does not use pointers, goto statement,
preprocessor header files etc.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
7
JAVA IS OBJECT-ORIENTED
 All coding and data reside within object and classes.
 Java has built-In exception handling.
 Everything in Java (except the primitive data types) is an object.
 The object model in Java is simple and easy to extend so that complex programming
problems can be reduced to simple solutions.
 Extensive set of classes, arranged in packages.
 E.g. java.awt, java.io, java.net
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
8
JAVA IS DISTRIBUTED
 Java is network friendly.
 Java is designed as a distributed language for
creating applications on networks.
 Multiple programmers can work together on a
single project from multiple remote locations.
 Both data and programs can be shared on
networks.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
9
JAVA IS INTERPRETED
 Java is both a compiled and Interpreted language.
 Java compiler generates platform-independent byte codes that are interpreted into
machine readable instructions by a Java Virtual Machine (JVM) or Java Interpreter at
runtime.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
10
JAVA IS PORTABLE
 Java programs are designed to work in a networked environment on a variety of
computers and operating systems.
 The size of the primitive data types are machine independent.
 Compiler generates platform independent byte codes rather than native machine code, so
it can be implemented on any machine.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
11
JAVA IS ROBUST
 Robust means strong.
 Java has hard and fast rules for compile time and runtime error checking.
 Java supports automatic garbage collection so all memory corruptions or unauthorized
memory accesses are impossible.
 Many error-prone features of C/C++ programming were removed (i.e. pointer).
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
12
JAVA IS SECURE
 Usage in networked environment requires more security.
 JVM verifies all byte codes before execution and ensures all programs follow the rules
regarding object access and usage.
 Java ensures that program cannot gain access to memory locations without proper
authorization.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
13
JAVA IS MULTITHREADED
 This feature allow us to handle multiple tasks simultaneously.
 Designed to run multiple thread.
 Easy to implement.
 Other systems have provided facilities via light weight libraries, but Java has inbuilt
language support.
 Great for multimedia displays.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
14
JAVA IS DYNAMIC
 Provides a highly dynamic runtime environment.
 Allows dynamically linking in new class libraries, methods and objects.
 New code can be linked on demand from anywhere on the network and new types can be
created as needed dynamically.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
15
JAVA IS ARCHITECTURAL-NEUTRAL
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
16
WORA (WRITE ONCE RUN ANYWHERE)
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
17
JAVA ENVIRONMENT
 Java includes many development tools, classes
and methods
 Development tools are part of Java Development
Kit (JDK) and
 The classes and methods are part of Java Standard
Library (JSL), also known as
Application Programming Interface (API).
 JDK constitutes of tools like Java compiler, Java
interpreted and many more.
 API includes hundreds of classes and methods
grouped into several packages according to their
functionality.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
18
JDK EVOLUTIONS
 To check version use command CMD  java –version
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
19
JDK EVOLUTIONS (CONT’D)
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
20
JAVA EDITIONS
 J2SE (Java 2 Standard Edition):
 To develop client-side standalone applications.
 J2ME (Java 2 Micro Edition):
 To develop applications for mobile devices such as cell phones.
 J2EE (Java 2 Enterprise Edition):
 To develop server-side applications such as Java servlets and Java server pages.
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
21
APPLICATIONS OF JAVA
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
22
ANY QUESTION?
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
23
7/12/2022
Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com
24

More Related Content

Similar to Introduction to Java Programming by Sadiq AMINZAI

NetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-BeasNetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-Beas
Chander445
 
How and why GraalVM is quickly becoming relevant for you (DOAG 2020)
How and why GraalVM is quickly becoming relevant for you (DOAG 2020)How and why GraalVM is quickly becoming relevant for you (DOAG 2020)
How and why GraalVM is quickly becoming relevant for you (DOAG 2020)
Lucas Jellema
 
J2me step by step
J2me step by stepJ2me step by step
J2me step by step
Yogesh Bindwal
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
Eric Wendelin
 
Javappt
JavapptJavappt
Javappt
Divas Gupta
 
Java training noida hibernate+spring+struts+web services(1)
Java training noida hibernate+spring+struts+web services(1)Java training noida hibernate+spring+struts+web services(1)
Java training noida hibernate+spring+struts+web services(1)
miracleindia
 
java training institute in Dange chowk pune
java training institute in Dange chowk punejava training institute in Dange chowk pune
java training institute in Dange chowk pune
CNC WEB WORLD
 
GDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NGDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android N
Imam Raza
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
SofiaCarter4
 
Ii 1300-java essentials for android
Ii 1300-java essentials for androidIi 1300-java essentials for android
Ii 1300-java essentials for android
Adrian Mikeliunas
 
Uses of java
Uses of javaUses of java
Uses of java
joeyparkker
 
Efficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVMEfficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVM
QAware GmbH
 
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and VaadinSimple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Jian Wu
 
SachinBC_Resume
SachinBC_ResumeSachinBC_Resume
SachinBC_Resume
Sachin BC
 
[20200720]cloud native develoment - Nelson Lin
[20200720]cloud native develoment - Nelson Lin[20200720]cloud native develoment - Nelson Lin
[20200720]cloud native develoment - Nelson Lin
HanLing Shen
 
Java Programming : introduction
Java Programming : introductionJava Programming : introduction
Java Programming : introduction
Kongu Engineering College, Perundurai, Erode
 
Node.js vs. java which one should you choose for backend development
Node.js vs. java  which one should you choose for backend development Node.js vs. java  which one should you choose for backend development
Node.js vs. java which one should you choose for backend development
Moon Technolabs Pvt. Ltd.
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
dxsaki
 
Java training in chennai, Java course in chennai
Java training in chennai, Java course in chennaiJava training in chennai, Java course in chennai
Java training in chennai, Java course in chennai
jeevi academy
 
Ch2
Ch2Ch2

Similar to Introduction to Java Programming by Sadiq AMINZAI (20)

NetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-BeasNetWeaver Developer Studio for New-Beas
NetWeaver Developer Studio for New-Beas
 
How and why GraalVM is quickly becoming relevant for you (DOAG 2020)
How and why GraalVM is quickly becoming relevant for you (DOAG 2020)How and why GraalVM is quickly becoming relevant for you (DOAG 2020)
How and why GraalVM is quickly becoming relevant for you (DOAG 2020)
 
J2me step by step
J2me step by stepJ2me step by step
J2me step by step
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
 
Javappt
JavapptJavappt
Javappt
 
Java training noida hibernate+spring+struts+web services(1)
Java training noida hibernate+spring+struts+web services(1)Java training noida hibernate+spring+struts+web services(1)
Java training noida hibernate+spring+struts+web services(1)
 
java training institute in Dange chowk pune
java training institute in Dange chowk punejava training institute in Dange chowk pune
java training institute in Dange chowk pune
 
GDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NGDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android N
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
 
Ii 1300-java essentials for android
Ii 1300-java essentials for androidIi 1300-java essentials for android
Ii 1300-java essentials for android
 
Uses of java
Uses of javaUses of java
Uses of java
 
Efficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVMEfficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVM
 
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and VaadinSimple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
 
SachinBC_Resume
SachinBC_ResumeSachinBC_Resume
SachinBC_Resume
 
[20200720]cloud native develoment - Nelson Lin
[20200720]cloud native develoment - Nelson Lin[20200720]cloud native develoment - Nelson Lin
[20200720]cloud native develoment - Nelson Lin
 
Java Programming : introduction
Java Programming : introductionJava Programming : introduction
Java Programming : introduction
 
Node.js vs. java which one should you choose for backend development
Node.js vs. java  which one should you choose for backend development Node.js vs. java  which one should you choose for backend development
Node.js vs. java which one should you choose for backend development
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
 
Java training in chennai, Java course in chennai
Java training in chennai, Java course in chennaiJava training in chennai, Java course in chennai
Java training in chennai, Java course in chennai
 
Ch2
Ch2Ch2
Ch2
 

Recently uploaded

Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 

Introduction to Java Programming by Sadiq AMINZAI

  • 1. JAVA PROGRAMMING By: SADIQ AMINZAI 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 1
  • 2. CONTENTS  Introduction to Java  Why Java is important?  What is Java?  Characteristics of Java  Java Environment  JDK Evolution…  Java Editions  WORA (Write Once Run Anywhere)  Applications of Java 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 2
  • 3. INTRODUCTION TO JAVA  Java is a Programming Language.  It was originally developed by SUN MICROSYSTEM.  It is created by James Gosling.  James Gosling was unhappy using C++ programing so he developed Java.  They developed a platform independent software based on the power of networks that can run on different application areas, such as computers and electronic devices.  It was initially called ‘Oak’.  It was renamed as ‘JAVA’ released in 1995 as a core component of Sun Microsystems Java Platform. James Gosling 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 3
  • 4. WHY JAVA IS IMPORTANT? Two reasons: 1) Trouble with C/C++ language is that they are not portable and are not platform independent languages 2) Emergence of World Wide Web (WWW), which demanded portable programs.  Portability and security necessitated the invention of Java.  Note: A portable application (also called as standalone app) is a software product designed to be easily moved from one computing environment to another. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 4
  • 5. WHAT IS JAVA?  A general purpose object-oriented language.  Write Once Run Anywhere (WORA).  Designed for easy Web/Internet applications.  Widespread acceptance. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 5
  • 6. CHARACTERISTICS OF JAVA  Java is simple.  Java is object-oriented.  Java is distributed.  Java is interpreted.  Java is portable.  Java is robust.  Java is secure.  Java is multithreaded.  Java is dynamic.  Java is architectural-neutral. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 6
  • 7. JAVA IS SIMPLE  Java was designed to be simple and familiar to learn languages.  Fundamental concepts can be grasped quickly as the features borrowed from C and C++.  Featured were removed that led to poor programming practices or were rarely used.  It does not use pointers, goto statement, preprocessor header files etc. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 7
  • 8. JAVA IS OBJECT-ORIENTED  All coding and data reside within object and classes.  Java has built-In exception handling.  Everything in Java (except the primitive data types) is an object.  The object model in Java is simple and easy to extend so that complex programming problems can be reduced to simple solutions.  Extensive set of classes, arranged in packages.  E.g. java.awt, java.io, java.net 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 8
  • 9. JAVA IS DISTRIBUTED  Java is network friendly.  Java is designed as a distributed language for creating applications on networks.  Multiple programmers can work together on a single project from multiple remote locations.  Both data and programs can be shared on networks. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 9
  • 10. JAVA IS INTERPRETED  Java is both a compiled and Interpreted language.  Java compiler generates platform-independent byte codes that are interpreted into machine readable instructions by a Java Virtual Machine (JVM) or Java Interpreter at runtime. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 10
  • 11. JAVA IS PORTABLE  Java programs are designed to work in a networked environment on a variety of computers and operating systems.  The size of the primitive data types are machine independent.  Compiler generates platform independent byte codes rather than native machine code, so it can be implemented on any machine. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 11
  • 12. JAVA IS ROBUST  Robust means strong.  Java has hard and fast rules for compile time and runtime error checking.  Java supports automatic garbage collection so all memory corruptions or unauthorized memory accesses are impossible.  Many error-prone features of C/C++ programming were removed (i.e. pointer). 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 12
  • 13. JAVA IS SECURE  Usage in networked environment requires more security.  JVM verifies all byte codes before execution and ensures all programs follow the rules regarding object access and usage.  Java ensures that program cannot gain access to memory locations without proper authorization. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 13
  • 14. JAVA IS MULTITHREADED  This feature allow us to handle multiple tasks simultaneously.  Designed to run multiple thread.  Easy to implement.  Other systems have provided facilities via light weight libraries, but Java has inbuilt language support.  Great for multimedia displays. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 14
  • 15. JAVA IS DYNAMIC  Provides a highly dynamic runtime environment.  Allows dynamically linking in new class libraries, methods and objects.  New code can be linked on demand from anywhere on the network and new types can be created as needed dynamically. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 15
  • 16. JAVA IS ARCHITECTURAL-NEUTRAL 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 16
  • 17. WORA (WRITE ONCE RUN ANYWHERE) 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 17
  • 18. JAVA ENVIRONMENT  Java includes many development tools, classes and methods  Development tools are part of Java Development Kit (JDK) and  The classes and methods are part of Java Standard Library (JSL), also known as Application Programming Interface (API).  JDK constitutes of tools like Java compiler, Java interpreted and many more.  API includes hundreds of classes and methods grouped into several packages according to their functionality. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 18
  • 19. JDK EVOLUTIONS  To check version use command CMD  java –version 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 19
  • 20. JDK EVOLUTIONS (CONT’D) 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 20
  • 21. JAVA EDITIONS  J2SE (Java 2 Standard Edition):  To develop client-side standalone applications.  J2ME (Java 2 Micro Edition):  To develop applications for mobile devices such as cell phones.  J2EE (Java 2 Enterprise Edition):  To develop server-side applications such as Java servlets and Java server pages. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 21
  • 22. APPLICATIONS OF JAVA 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 22
  • 23. ANY QUESTION? 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 23
  • 24. 7/12/2022 Sadiq Aminzai | 0772 50 20 20 | +93789 68 10 10 | sadiq.szu@gmail.com 24