Chapter 1
Chapter 1
Introduction to Java
History of Java
ava was originally designed for small embedded systems interactive television, set-top boxes
However, it was best suited for internet programming and was incorporated by Netscape.
Java team members were known as Green Team
Java was developed by James Gosling, who is known as the father of Java, in
1995
Team of James Gosling, Mike Sheridan, and Patrick
Naughton initiated the Java language project in June 1991. The small
team of sun engineers was called as Green Team
Firstly, it was called "Greentalk"
Later it was called Oak
Oak is a symbol of strength and chosen as a national tree of many countries like the U.S.A.,
France, Germany, Romania, etc
Oak was renamed as "Java" in 1995 because it was already a trademark by Oak
Technologies.
JDK 1.0 was released on January 23, 1996
Java Versions
Object-oriented
• Everything in Java is an object.
• Software is a combination of different types of objects
that incorporate both data and behavior
What are the object oriented features?
Simple
• very easy to learn, syntax is simple and easy to
understand
Secured
• No explicit
• pointer
Java Programs run inside a virtual
machine
• It also has class loader, bytecode verifier and security
manager
Features of Java
Platform Independent
• Java is a write once, run anywhere
language.
Robust
• It uses strong memory management.
• pointers are not there, hence avoids security
• problems.
Java provides automatic garbage collection.
• There are exception handling & type checking mechanism
Portable
• Java facilitates us to carry the Java bytecode to any
platform
Features of Java
Architecture Neutral
• There are no implementation dependent features
Dynamic
• It supports the dynamic loading of classes
Interpreted
• Java compiler first compiles source code into a byte-
code.
• At run time Java Virtual Machine interprets byte-code
and executes it.
Features of Java
High Performance
• Java is faster than other traditional interpreted
programming languages because Java bytecode is
similar to native code.
Multithreaded
• A thread is like a separate program, executing
concurrently. We can write Java programs that deal
with many tasks at once by defining multiple threads.
Distributed
• Java is distributed because it facilitates users to create
distributed applications in Java.
• RMI is used for creating distributed applications.
• JDK contains tools required to write Java programs and JRE to execute them.
• Java application launcher opens a JRE, loads the necessary class, and executes its main
method.
JRE
• JRE contains class libraries, JVM, and other supporting files. It does not include any tool for Java
development like a debugger, compiler, etc.
• It uses important package classes like math, swing, util, lang, awt, and runtime libraries.
• If you have to run Java applets, then JRE must be installed in your system.
JIT
• JIT compiler is a component of the runtime environment that improves the performance of Java
applications by compiling bytecodes to native machine code at run time.
• Bytecode is a highly optimized set of instructions for the Java Virtual Machine
Jagged Array
As multidimensional array is array of array, each array has its own different length
Array, Functions
Array, Functions