21-12-2012, 03:13 PM
JAVA ASSIGNMENT
JAVA ASSIGNMENT.pdf (Size: 2.19 MB / Downloads: 57)
WHAT IS JAVA:
Java is a Object oriented programming language originally developed by James Gosling at Sun
Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core
component of Sun Microsystems' Java platform. The language derives much of
its syntax from C and C++ but has a simpler object model and fewer low-level facilities than
either C or C++. Java applications are Typically compiled to bytecode (class file) that can run on
any Java Virtual Machine (JVM) regardless of computer architecture. Java is a generalpurpose,
concurrent, class-based, object-oriented language that is specifically designed to have as few
implementation dependencies as possible. It is intended to let application developers "write once, run
anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run
on another. Java is as of 2012 one of the most popular programming languages in use, particularly for
client-server web applications, with a reported 10 million users.
The original and reference implementation Java compilers, virtual machines, and class libraries were
developed by Sun from 1995. As of May 2007, in compliance with the specifications of the Java
Community Process, Sun relicensed most of its Java technologies under the GNU General Public
License. Others have also developed alternative implementations of these Sun technologies, such as
the GNU Compiler for Java and GNU Classpath.
Platform Independent
The concept of Write-once-run-anywhere (known as the Platform independent) is one of the important
key feature of java language that makes java as the most powerful language. Not even a single language
is idle to this feature but java is more closer to this feature. The programs written on one platform can run
on any platform provided the platform must have the JVM.
Simple
There are various features that makes the java as a simple language. Programs are easy to write and
debug because java does not use the pointers explicitly. It is much harder to write the java programs that
can crash the system but we can not say about the other programming languages. Java provides the bug
free system due to the strong memory management. It also has the automatic memory allocation and
deallocation system.
Object Oriented
To be an Object Oriented language, any language must follow at least the four characteristics.
· Inheritance : It is the process of creating the new classes and using the behavior of the existing
classes by extending them just to reuse the existing code and adding the additional features
as needed.
· Encapsulation: : It is the mechanism of combining the information and providing the abstraction.
· Polymorphism: : As the name suggest one name multiple form, Polymorphism is the way of
providing the different functionality by the
functions having the same name based on the signatures of the methods.
· Dynamic binding : Sometimes we don't have the knowledge of objects about their specific types
while writing our code. It is the way of providing the maximum functionality to a program about
the specific type at runtime.
Portable
The feature Write-once-run-anywhere makes the java language portable provided that the system must
have interpreter for the JVM. Java also have the standard data size irrespective of operating system or
the processor. These features makes the java as a portable language.
Dynamic
While executing the java program the user can get the required files dynamically from a local drive or from
a computer thousands of miles away from the user just by connecting with the Internet.
Secure
Java does not use memory pointers explicitly. All the programs in java are run under an area known as
the sand box. Security manager determines the accessibility options of a class like reading and writing a
file to the local disk. Java uses the public key encryption system to allow the java applications to transmit
over the internet in the secure encrypted form. The bytecode Verifier checks the classes after loading.
Performance
Java uses native code usage, and lightweight process called threads. In the beginning interpretation of
bytecode resulted the performance slow but the advance version of JVM uses the adaptive and just in
time compilation technique that improves the performance.
Multithreaded
As we all know several features of Java like Secure, Robust, Portable, dynamic etc; you will be more
delighted to know another feature of Java which is Multithreaded.
Java is also a Multithreaded programming language. Multithreading means a single program having
different threads executing independently at the same time. Multiple threads execute instructions
according to the program code in a process or a program. Multithreading works the similar way as
multiple processes run on one computer.