INTRODUCTION TO JAVA
CREATION OF JAVA:
Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank and
Mike Sheridan at SUN Micro System Incorporation in 1991. Initially it was called
"OAK", but later was renamed as "JAVA" in 1995. Before the
initial implementation of OAK in 1992 and the public announcement of Java in
1995, many more contributed to the design and evolution of the language.
JAVA OVERVIEW:
Java is simple, elegant, powerful and easy to use object oriented programming
language. Java is cohesive and consistent. Java is to Internet programming what
C is to system programming, a revolutionary force that is changing the world.
Java can be used to create applets, and applications. Applets, intelligent
dynamic programs, are limited only by one's imagination. It is the ability to
create applets that makes the Java different from other programming languages.
Java Is Object Oriented: Java is object oriented, which give the leverage to
programmer to focus on program design. This uses the paradigm of classes. Class
can be thought of black box, which binds the code and data together, and
instances of it can be created. Encapsulation makes it possible to make the
changes in code without breaking other programs using that code. It includes
inheritance, ability to derive new classes from existing classes.
Java is Portable : An application written in Java will run on all the major
platforms. The Virtual Machine(VM) is what gives Java the cross-platform
capabilities. Rather than being compiled into machine language, which is
different for each operating systems and computer architecture, Java code is
compiled into Byte Codes. Byte code is the key that allows Java to solve both
the security and portability problems. A Just In Time (JIT) compiler which is
part of JVM compiles bytecode into executable code in real time, yielding
significant boost in performance. Java meets the "Write once; run
anywhere" requirement of the today's world.
Java is Robust : Memory management, tedious task in traditional programming
environments, is virtually eliminated in Java. Garbage collection automatically
takes care of allocation and de-allocation of memory, a huge potential source of
errors. Because Java enforces strong type checking, many errors are caught when
code is compiled. It provides object-oriented exception handling to check the
run-time errors.
Java is Multithreaded : Java supports multithreaded programming, which allows
you to write programs that do many things simultaneously. Java run-time system
comes with an elegant yet sophisticated solution for multiprocess
synchronization that enables to construct smoothly running interactive systems.
Java is Secure : The first-tier of in Java language is the language design
itself- the syntactical and semantic constructs allowed by the language. Java
has following design constructs with a bearing of security.
Strong typing and safe type casting, no pointers, final classes and methods,
syntax for thread safe data structures.
Bytecode verification, namespace encapsulation and very late linking and binding
ensure security at compile time. The byte code verifier, part of the virtual
machine, checks the
a) Format of the incoming code is correct
b) Incoming code doesn't forge pointers
c) It doesn't violate access restrictions
d) It accesses objects as what they are
The byte code loader, another part of the virtual machine, checks whether
classes loaded during program execution are local or from across a network.
Imported classes can not be substituted for built-in classes.
The Java security manager allows user to restrict untrusted Java applets so that
they cannot access the local network, local files and other resources.