ACP_Lecture_01_Java_Introduction
ACP_Lecture_01_Java_Introduction
By
Usama Imtiaz
About Me
Lecturer (SE&CS)
Ph.D. In progress (FAST-NU)
AI Consultant (Aim Lab FAST NU)
MSCS (FAST NU)
BSCS (COMSATS)
Lecture Outlines
Computer Programs and Programming Languages
Programming Language Paradigms
Introduction to Java
Why Java
History of Java Language
Java’s Future
Java’s Features
Java Code Compiling Process
Types of Java Applications
The Java Language Specifications
Java Application Programming Interface (API)
The Java Development Kit (JDK)
Java Development Tools (or IDEs)
Summary
Computer Programs
Programming Paradigms
Imperative Declarative
Structured Domain-Specific
Object-Oriented
Java - Introduction
Java Is Simple
Java Is Object-Oriented
Java Is Distributed
Java Is Interpreted
Java Is Robust
Java Is Secure
Java Is Architecture-Neutral
Java Is Portable
Java's Performance
Java Is Multithreaded
Java Is Dynamic
Features of Java
Java Is Portable
through encapsulation, inheritance, and
polymorphism.
Java's Performance • Encapsulation
Java Is Multithreaded • Inheritance
Java Is Multithreaded
Java Is Dynamic
Features of Java
Java Is Portable
Java's Performance
Java Is Multithreaded
Java Is Dynamic
Features of Java
Java has eliminated certain types of error-
Java Is Simple prone programming constructs found in
other languages.
Java Is Object-Oriented
Java Is Distributed Java has a runtime exception-handling
Java Is Interpreted feature to provide programming support
for robustness.
Java Is Robust
Java Is Secure No error-prone constructs
Java Is Portable
Java's Performance
Java Is Multithreaded
Java Is Dynamic
Features of Java
Java Is Simple
Java Is Object-Oriented
Java Is Distributed Automatic null checking of references
Java Is Architecture-Neutral
Java Is Portable
Java's Performance
Java Is Multithreaded
Java Is Dynamic
Features of Java
Write once, run anywhere
Java Is Simple
Java Is Object-Oriented With a Java Virtual Machine (JVM), you
Java Is Simple
Java Is Object-Oriented
Java Is Distributed
Java Is Interpreted
Java Is Robust
Java Is Secure
Java Is Architecture-Neutral
Java Is Portable Because Java is architecture neutral, Java
programs are portable.
Java Is Multithreaded Java programs can be run on any
Java Is Dynamic platform without being recompiled.
Features of Java
Java Is Simple
Java Is Object-Oriented
Java Is Distributed
Java Is Interpreted
Java Is Robust
Java Is Secure
Java Is Architecture-Neutral
Java Is Portable
Java's Performance Byte code includes compiling information
Interpreter interprets byte code quickly
Java Is Multithreaded
Java Is Dynamic
Features of Java
Java Is Simple
Java Is Object-Oriented
Java Is Distributed
Java Is Interpreted
Java Is Robust
Java Is Secure
Java Is Architecture-NeutralMultithread programming is smoothly
Java Is Portable integrated in Java, whereas in other
languages you have to call procedures
specific to the operating system to enable
Java's Performance multithreading.
Java Is Multithreaded
Java Is Dynamic Parallel task Data
sharing
Features of Java
Java was designed to adapt to an evolving
Java Is Simple environment. New code can be loaded on the
Java Is Architecture-Neutral
Java Is Portable
Java's Performance
Java Is Multithreaded
Java Is Dynamic
Summary of Java’s Features
Compiling C++ Source Code
Create/Modify Source C o d e
So u rc e c o d e (d ev elo p ed b y the p ro g ra m m e r)
Sa v e d o n the disk
public class Wel co me {
public static void main(String[] args)
{ System.out.println("Welcome to Source C o d e
Java!");
}
}
Co mpile Source C o d e
B y t e c o d e (generated b y the compiler for J V M
i.e., javac Welcome.java
to read an d interpret, not for y o u to
understand)
…
Method Welco me() If co mp il ati o n errors
0 aload_0 stored o n the disk
…
B ytecode
Method void main(java.lang.String[])
0 getstatic # 2 …
3 ldc # 3 <String "We l c o me to
Java!">
5 invokevirtual # 4 …
8 return R u n Byteode
i.e., java We l c o me
R e su lt
- JAVA Editions
java.sun.com/docs/books/jls
Java API – Application Programming Interface
Besides JDK, you can use a Java development tool (e.g., Net-
Beans, Eclipse, and TextPad) — Software that provides an
integrated development environment (IDE) for rapidly
developing Java programs.
• Eclipse Platform
• http://www.eclipse.org/platform
• Developed by the Apache Software Foundation
NetBeans
JCreator
Notepad and Textpad
Java Communities
http://www.javaworld.com
http://docs.oracle.com/javase/tutorial/
Java Home
• http://java.sun.com
• http://www.java.com
• http://www.oracle.com/technetwork/java/index.html
Java Supported Companies
Summary
Introduction of Java
Brief history of Java
Features/characteristics of Java
Java compilation Process
Types of Java Applications
Java Development Kit
Java Editions
Java Development Tools