Lect 1- The history and Evolution of Java

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

The history and Overview of

Java
(Chapter 1,2 of Schilit)
Object Oriented Programming BS (CS/SE) II
By
Sher Muhammad Daudpota
Professor of Computer Science
Sukkur IBA University
Introduction to Course
• PowerPoint are for me, you read the book
• Assessment (Theory 100 Marks)
• 30% mid exams
• 10% project, to be submitted in a group of three
• 10% class quizzes on LMS
• 50% final exam
• Course Outlines
Why new computer language?
• Adapt changing environment

• Implement refinements and improvements in the art of programming


Trade-offs in language design
• Ease of use vs power
• Safety vs efficiency
• Rigidity vs extensibility
History of Java
• Assembly, Basic, Pascal, Fortran, COBOL…
• All relied on GOTO
• Birth of modern programming: C
• 1970 BCPL
• Formalized in 1989 as C with adoption of ANSI
• The next step: C++
• In Bell Labs 1979
History of Java
• The Java creation
• 1991 by James Gosling and Co. at Sun Microsystem
• Initially named as Oak later in 1995 renamed to Java
• Primary motivation
• Platform independence
• Consumer Electronics
History of Java
• Connection with C#
• Impact on Internet
• Applets
• Security
• Portability
History of Java
• Applet (deprecated since JDK 9)
• Java Web Start (deprecated since JDK 11)
• jlink (added from JDK 9 )
Bytecode — the magic of Java
• JVM
• JRE
• JIT
Servlets
• Server Side programs
Java Buzzwords
1. Simple
2. Secure
3. Portable
4. Object-oriented
5. Robust (memory management, exception handling, reliability)
6. Multithreaded
7. Architecture-neutral (write once; run anywhere, anytime, forever)
8. Interpreted and High Performance (JIT, no compromise on performance)
9. Distributed
10. Dynamic
An Overview of Java
• Computer Program consist of,
• Code
• Data
• Two programming paradigms,
• What is happening
• process oriented model
• code acting on data
• procedural languages
• Who is being affected
• Object Oriented Programming
• Data controlling access to code
An Overview of Java

• Object Oriented Programming


• Abstraction
• Three Basic Principles of OOP
• Encapsulation (classes, instance variables, public methods, private methods)
• Inheritance
• Polymorphism
An Overview of Java
Code: “Hello World”
Code: “VariablesDemo”
• print
• println
• Comments
• Multiline comments
• Block of code
Code: “IfDemo”
Code: “ForDemo”
Lexical Issues
• A program is collection of,
• Whitespaces
• Identifiers
• Literals
• Comments
• Operators
• Separators
• Keywords
Whitespace
• Java is a free-form language
• Whitespace include,
• Space
• Tab
• Newline
• Form feed
Identifiers
• Names of variables, methods, classes etc..
• Allowed
• Uppercase lowercase letter
• Numbers (must not be first char)
• Dolor sign ($)
• Underscore (_)
Literals
Comments
• Single line //
• Mutiline /* */
• Documentation comments /** */
Separators
Keywords
Java Class Libraries
• java.lang.*
• System class

You might also like