Вы находитесь на странице: 1из 27

Java

The Complete Reference


Java

Agenda
1. Evolution of Java
2. Purpose
3. Design Goals
4. Java Architecture
Evolution of Java
Key Founders
• Java was the brainchild of:
– James Gosling
– Patrick Naughton
– Chris Warth
– Ed Frank
– Frank Sheridan
The origin of Java can be traced back to the fall
of 1992, and was initially called Oak.
Oak was renamed as Java in 1995.
Purpose

• Java was originally meant to be a


platform- neutral language for
embedded software in devices.
• The language could be used to
produce platform- neutral code.
Design Goal
• Simple - syntax like C, but easier.
• Secure - compile- and runtime-support for security.
• Distributed - built to run over networks.
• Object-oriented - designed from the ground-up to be object-
oriented.
• Robust - strongly typed, memory management, exception handling.
• Portable - ``Write Once, Run Anywhere''. Runs on any platform with
a JVM; Windows, Unix, Linux, Apple, AS/400, cell phones, desktop
sets, ...
• Interpreted - Java bytecode is portable.
• Multithreaded - much easier to write multithreaded programs.
• Dynamic - classes are loaded as needed.
• High-performance - just-in-time compilers, advanced memory
management makes Java programs faster.
Java Architecture
Step 1
• Create a java source code with .java
extension.
Step 2
• Compile the source code using java compiler,
which will create byte code with .class ext.
Step 3
• Class loader reads both the user defined and
library classes into the memory for execution.
Step 4
• Byte code verifier validates all the byte codes are
valid and do not violate java’s security
restrictions.
Step 5
• JVM reads byte code and translates into machine
code for execution.
5 Phases of Java Program
1. Edit
Welcome.java
2. Compile
javac Welcome.java  Welcome.class
3. Loading
4. Verify
5. Execute
java Welcome
Java Virtual Machine
QUIZ
1) Write the correct order of
Execution?
A) Class Loader
B) Interpretation
C) Compilation
D) Byte Code Verification
E) Java Source Code
F) Execution
QUIZ
1) Write the correct order of Execution?
A) Class Loader
B) Interpretation
C) Compilation
D) Byte Code Verification
E) Java Source Code
F) Execution
Ans: E, C, A, D, B, F
QUIZ
2) Which of the following is used to
load a .class file?
A) Class Loader
B) Byte code verifier
C) JiT Compiler
D) Interpreter
QUIZ
2) Which of the following is used to
load a .class file?
A) Class Loader
B) Byte code verifier
C) JiT Compiler
D) Interpreter
Ans:
QUIZ
3) When a Java program is compiled, it
creates a
A) An obj file
B) An exe file
C) A .class file
D) .sh file
QUIZ
3) When a Java program is compiled, it
creates a
A) An obj file
B) An exe file
C) A .class file
D) A .sh file
QUIZ
3) When a Java program is compiled, it
creates a
A) An obj file
B) An exe file
C) A .class file
D) A .sh file

Ans:
QUIZ
4)The JDK is the superset of the JRE ,and contains
everything that is in the JRE plus tools such as
compilers and debuggers necessary for
developing applets and applications.

A) TRUE
B) FALSE
QUIZ
4)The JDK is the superset of the JRE ,and contains
everything that is in the JRE plus tools such as
compilers and debuggers necessary for
developing applets and applications.

A) TRUE
B) FALSE

Ans:

Вам также может понравиться