SlideShare a Scribd company logo
Lecture 02
Introduction to Java
Lecture Outline
• Evolution of Programming Languages
• Why Java?
• Java History
• Java Versions
• Java Features
• Java Procedure
• Revision of Programming Fundamentals Topics
What is a Program?
• A computer program is a sequence of instructions written to
perform a specified task for a computer.
The Evolution of Programming Language
• Machine Language: 1940’s
• Assembly Language: Early 1950’s
• Higher-Level Languages: Late 1950’s
• Fortran: scientific computation
• COBOL: business data processing
• Lisp: symbolic computation
• Today: Thousands of programming languages available
What is Programming?
• When we say “programming” we are actually referring to the
science of transforming our intentions in a high-level
programming language.
What is this course about?
• Learn programming in a high-level programming language.
• Programming has many paradigms
• Procedural
• Object-Oriented
• We will study Object-Oriented Programming using ‘Java’, a
popular high-level object-oriented programming language.
Non-structured Programming
e.g. Assembly Language, BASIC
• Advantages
– Low Level access
– High Optimization
– Shorter size programs
• Disadvantages
– Large programs highly complex
– Difficult to understand
– Repetition of code
a 100
mov ax,0002
mov bx,0004
add ax,bx
nop
Procedural/Structured Programming
e.g. C, Pascal
• Advantages
– Fast execution
– Small memory footprint (Size)
• Disadvantages
– Limited in Enhancement over the time
– Low reusability
– Difficult to Extended
– Less Dynamic architecture
Object Oriented Programming
e.g. C++, C#, Java etc
• Disadvantages
– Little Slow execution
– Little Big memory footprint (Size)
• Advantages
– Better Enhancement over the time
– High reusability
– Easy to Extended
– Better representation of real world problems
Why Java?
• It’s the current “hot” language
• Java mean “Cup of Coffee”
• It’s almost entirely object-oriented
• It has a vast library of predefined objects and operations
• It’s more platform independent
• This makes it great for web programming too (but that is beyond this
course)
• It’s more secure
• It isn’t C++
Java History (1 of 3)
• created in 1991
• by James Gosling et al. of Sun Microsystems.
• Initially called Oak, in honor of the tree outside Gosling's window,
its name was changed to Java because there was already a
language called Oak.
Java History (2 of 3)
• The term Java actually refers to more than just a particular
language like C or Pascal. Java encompasses several parts,
including:
• A high level language – Java language is a high level one that at a
glance looks very similar to C and C++ but offers many unique features
of its own.
• Java bytecode – A compiler, such as Sun's javac, transforms the Java
language source code to bytecode that runs in the JVM.
• Java Virtual Machine (JVM) – a program, such as Sun's java, that runs
on a given platform and takes the bytecode programs as input and
interprets them just as if it was a physical process executing machine
code.
Java History (3 of 3)
• Sun provides a set of programming tools such as javac, java and
others in a bundle that it calls a Java Software Development Kit
for each version of the language for different platforms such as
Windows, Linux, etc.
• Sun also provides a runtime bundle with just the JVM when the
programming tools are not needed.
Java Versions (1 of 2)
• Since its introduction in 1995, Sun has released a new version of the
Java language every two years or so.
• These new versions brought enhancements, new capabilities and fixes to
bugs.
• Till 2002, the versions were numbered 1.x, where x reached up till 4.
(Intermediate revisions were labeled with a third number - 1.x.y - as in
1.4.2.)
• After that all the versions were released with a whole number such as 5.0 or
6.
• The current version of Java is Java SE 17 (LTS) where SE refers to
Standard Edition (used for targeting workstations) and the LTS refers to
Long Term Support.
• Not all Java versions have LTS, so far only 3 have been released (2008,
2018 and 2021)
• Another newer version of Java SE 18 is expected to be released in
March 2022
Java Versions (2 of 2)
• The major editions of Java are:
• Java Card (for smart cards)
• Java Micro Edition (for limited resources environments)
• Java Standard Edition (for workstations)
• Java Enterprise Edition (for enterprises and internet environments)
Java Features
• Simple & Secure
• Object-Oriented
• Robust
• Restricts the programmer to find the mistakes early
• Performs compile-time (strong typing) and run-time (exception-handling)
checks
• Manages memory automatically
• Multithreaded
• Architecture-Neutral
• Interpreted and High-Performance
• Distributed
• Dynamic
Java Procedure
• The essential steps to creating and running Java programs go as
follows:
• Create a Java source code file
• Compile the source code
• Run the compiled code in any Java Virtual Machine.
Java Program Execution
Java Program Execution
• Manual – with text editor (notepad)
• Create the Java source code files (*.java)
• Use Command Line tools in the Java Software Development Kit (SDK).
• The SDK is provided by Sun for several platforms and includes a
number of tools, the most important of which are:
• javac – compiles Java source code files
• java – runs Java application programs
• appletviewer – tests applets independently of a browser
• Integrated Development Environment (IDE)
• NetBeans
• Borland JBuilder
• Eclipse
• Dr Java
• IntelliJ IDEA (My Favorite)
Revision (1 of 3)
• Decision Making Statements
• If-else
• Switch Case
• Loops
• For
• While
• Do-While
• Nested {{}}
Revision (2 of 3)
• Variables
• Strings in C/C++
• Arrays
• 1D
• 2D
• ND
Revision (3 of 3)
• Functions / Methods
• Declaration
• Definition
• Calling
• Overloading
• Passing Arguments
• By Value
• By reference in java?
Thank You 
Any Questions?

More Related Content

PDF
Java Basic.pdf
PPSX
JAVA.ppsx java code java edv java development
PDF
Java - At a glance
PDF
Java Notes .pdf
PDF
JAVA BOOK BY SIVASANKARI
PPTX
Programming in java ppt
PPTX
Programming in java ppt
PPT
Java2020 programming basics and fundamentals
Java Basic.pdf
JAVA.ppsx java code java edv java development
Java - At a glance
Java Notes .pdf
JAVA BOOK BY SIVASANKARI
Programming in java ppt
Programming in java ppt
Java2020 programming basics and fundamentals

Similar to OOP - Lecture02 - Introduction to Java.pptx (20)

PPSX
Introduction of java
DOCX
JAVA CORE
PPTX
The Java Story
PPTX
Java 2 computer science.pptx
PPTX
JAVAPart1_BasicIntroduction.pptx
PPTX
JAVA_Day1_BasicIntroduction.pptx
PDF
TechSearchWeb Tutorials.pdf
PPTX
Java (1)
DOCX
Introduction to java programming tutorial
PPTX
Chapter-1 Introduction.pptx
PPTX
Chapter 1 java
PDF
TechSearchWeb.pdf
PDF
Technology Tutorial.pdf
PPTX
Java Introduction
PPTX
PROGRAMMING IN JAVA unit 1.pptx
PPTX
Manually exercising input combinations on the bench or with a microcontroller
PPTX
1_Introduction to Java.pptx java programming
PPTX
java basics concepts and the keywords needed
PPTX
Classes and Objects
PPTX
1 .java basic
Introduction of java
JAVA CORE
The Java Story
Java 2 computer science.pptx
JAVAPart1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
TechSearchWeb Tutorials.pdf
Java (1)
Introduction to java programming tutorial
Chapter-1 Introduction.pptx
Chapter 1 java
TechSearchWeb.pdf
Technology Tutorial.pdf
Java Introduction
PROGRAMMING IN JAVA unit 1.pptx
Manually exercising input combinations on the bench or with a microcontroller
1_Introduction to Java.pptx java programming
java basics concepts and the keywords needed
Classes and Objects
1 .java basic
Ad

Recently uploaded (20)

PDF
Pre independence Education in Inndia.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
RMMM.pdf make it easy to upload and study
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
01-Introduction-to-Information-Management.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
GDM (1) (1).pptx small presentation for students
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Pre independence Education in Inndia.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Complications of Minimal Access Surgery at WLH
RMMM.pdf make it easy to upload and study
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
01-Introduction-to-Information-Management.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
GDM (1) (1).pptx small presentation for students
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial diseases, their pathogenesis and prophylaxis
Abdominal Access Techniques with Prof. Dr. R K Mishra
Microbial disease of the cardiovascular and lymphatic systems
TR - Agricultural Crops Production NC III.pdf
PPH.pptx obstetrics and gynecology in nursing
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Ad

OOP - Lecture02 - Introduction to Java.pptx

  • 2. Lecture Outline • Evolution of Programming Languages • Why Java? • Java History • Java Versions • Java Features • Java Procedure • Revision of Programming Fundamentals Topics
  • 3. What is a Program? • A computer program is a sequence of instructions written to perform a specified task for a computer.
  • 4. The Evolution of Programming Language • Machine Language: 1940’s • Assembly Language: Early 1950’s • Higher-Level Languages: Late 1950’s • Fortran: scientific computation • COBOL: business data processing • Lisp: symbolic computation • Today: Thousands of programming languages available
  • 5. What is Programming? • When we say “programming” we are actually referring to the science of transforming our intentions in a high-level programming language.
  • 6. What is this course about? • Learn programming in a high-level programming language. • Programming has many paradigms • Procedural • Object-Oriented • We will study Object-Oriented Programming using ‘Java’, a popular high-level object-oriented programming language.
  • 7. Non-structured Programming e.g. Assembly Language, BASIC • Advantages – Low Level access – High Optimization – Shorter size programs • Disadvantages – Large programs highly complex – Difficult to understand – Repetition of code a 100 mov ax,0002 mov bx,0004 add ax,bx nop
  • 8. Procedural/Structured Programming e.g. C, Pascal • Advantages – Fast execution – Small memory footprint (Size) • Disadvantages – Limited in Enhancement over the time – Low reusability – Difficult to Extended – Less Dynamic architecture
  • 9. Object Oriented Programming e.g. C++, C#, Java etc • Disadvantages – Little Slow execution – Little Big memory footprint (Size) • Advantages – Better Enhancement over the time – High reusability – Easy to Extended – Better representation of real world problems
  • 10. Why Java? • It’s the current “hot” language • Java mean “Cup of Coffee” • It’s almost entirely object-oriented • It has a vast library of predefined objects and operations • It’s more platform independent • This makes it great for web programming too (but that is beyond this course) • It’s more secure • It isn’t C++
  • 11. Java History (1 of 3) • created in 1991 • by James Gosling et al. of Sun Microsystems. • Initially called Oak, in honor of the tree outside Gosling's window, its name was changed to Java because there was already a language called Oak.
  • 12. Java History (2 of 3) • The term Java actually refers to more than just a particular language like C or Pascal. Java encompasses several parts, including: • A high level language – Java language is a high level one that at a glance looks very similar to C and C++ but offers many unique features of its own. • Java bytecode – A compiler, such as Sun's javac, transforms the Java language source code to bytecode that runs in the JVM. • Java Virtual Machine (JVM) – a program, such as Sun's java, that runs on a given platform and takes the bytecode programs as input and interprets them just as if it was a physical process executing machine code.
  • 13. Java History (3 of 3) • Sun provides a set of programming tools such as javac, java and others in a bundle that it calls a Java Software Development Kit for each version of the language for different platforms such as Windows, Linux, etc. • Sun also provides a runtime bundle with just the JVM when the programming tools are not needed.
  • 14. Java Versions (1 of 2) • Since its introduction in 1995, Sun has released a new version of the Java language every two years or so. • These new versions brought enhancements, new capabilities and fixes to bugs. • Till 2002, the versions were numbered 1.x, where x reached up till 4. (Intermediate revisions were labeled with a third number - 1.x.y - as in 1.4.2.) • After that all the versions were released with a whole number such as 5.0 or 6. • The current version of Java is Java SE 17 (LTS) where SE refers to Standard Edition (used for targeting workstations) and the LTS refers to Long Term Support. • Not all Java versions have LTS, so far only 3 have been released (2008, 2018 and 2021) • Another newer version of Java SE 18 is expected to be released in March 2022
  • 15. Java Versions (2 of 2) • The major editions of Java are: • Java Card (for smart cards) • Java Micro Edition (for limited resources environments) • Java Standard Edition (for workstations) • Java Enterprise Edition (for enterprises and internet environments)
  • 16. Java Features • Simple & Secure • Object-Oriented • Robust • Restricts the programmer to find the mistakes early • Performs compile-time (strong typing) and run-time (exception-handling) checks • Manages memory automatically • Multithreaded • Architecture-Neutral • Interpreted and High-Performance • Distributed • Dynamic
  • 17. Java Procedure • The essential steps to creating and running Java programs go as follows: • Create a Java source code file • Compile the source code • Run the compiled code in any Java Virtual Machine.
  • 19. Java Program Execution • Manual – with text editor (notepad) • Create the Java source code files (*.java) • Use Command Line tools in the Java Software Development Kit (SDK). • The SDK is provided by Sun for several platforms and includes a number of tools, the most important of which are: • javac – compiles Java source code files • java – runs Java application programs • appletviewer – tests applets independently of a browser • Integrated Development Environment (IDE) • NetBeans • Borland JBuilder • Eclipse • Dr Java • IntelliJ IDEA (My Favorite)
  • 20. Revision (1 of 3) • Decision Making Statements • If-else • Switch Case • Loops • For • While • Do-While • Nested {{}}
  • 21. Revision (2 of 3) • Variables • Strings in C/C++ • Arrays • 1D • 2D • ND
  • 22. Revision (3 of 3) • Functions / Methods • Declaration • Definition • Calling • Overloading • Passing Arguments • By Value • By reference in java?
  • 23. Thank You  Any Questions?