Friday, June 18, 2010

The Java Buzzwords: Explained

Simple
Java was designed fro the easiness of the programmer to learn and use effectively. If you have some knowledge in C or C++ it is very easy to understand Java as it derived its features fro both C and C++.

Object Oriented

Java is an Object Oriented programming language. Although influenced by its predecessors, Java was not designed to be source-code compatible with any other language. The object model in Java is simple and easy to extend, while simple types, such as integers, are kept as high performance non objects.

Robust

Java programs are robust. The ability to create robust programs, programs that run in a wide verity of environment was given high priority in the design of Java.

At the same time, Java avoids the burden of errors. Because Java is a strictly typed language, it checks errors at compile time and during run-time.

In Java the task of memory management is done automatically. Java allocates and deallocates memory by itself.

In Java the Run-time exceptions are handled in an organized Object Oriented exception handling technique.

Multi-threaded


The Java Buzzwords

  • Simple
  • Secure
  • Portable
  • Object-Oriented
  • Robust
  • Multi-threaded
  • Architecture-neutral
  • interpreted
  • High performance
  • Distributed
  • Dynamic
Next Page>>

Java's Magic: The Bytecode

The key that allows Java to solve both the security and the portability is Bytecode. The output of a Java compiler is not an executable code. Rather, it is bytecode. Bytecode is a highly optimized set of instructions designed to be executed by the Java Runtime System, which is called Java Virtual Machine(JVM). JVM can be said as an interpreter for the bytecode

Translating a Java program to a bytecode makes it much more easier to run the program in a wide variety of environment. The reason is straight forward : only the JVM needs to be implemented for each platform. Once the run-time package exists for a given system, any Java program can run on it. Although the details of the JVM defers from platform to platform, all interprets the same bytecode.

The interpretation helps java code to be secured. The execution of the Java code is under the control of the JVM. JVM can contain the program and prevent it from gathering the side effects from outside of the system.

The only drawback is that the compiling and interpreting makes the program execution a little bit slow, when compared to the direct compilation to the executable code.

Tuesday, June 15, 2010

The Creation of Java

Java is related to C++, which is a direct descendent of C. From C, Java derived its syntax and
from C++ the Object Oriented features.
James Gosling, Patrick Naughton, Chris Warth, Ed Frank,
and Mike Sheridan conceived Java at Sun Microsystems, Inc. in 1991. It took 18 months to develop
the first working version. This language was initially called “Oak” but was renamed “Java” in 1995.
Between the initial implementation of Oak in the fall of 1992 and the public announcement of Java in the
spring of 1995, many more people contributed to the design and evolution of the language. Bill Joy,
Arthur van Hoff, Jonathan Payane, Frank Yellin, and Tim Lindholm were Key contributors to the
maturing of the original prototype. Somewhat surprisingly, the original impetus for java was not the I
nternet! Instead, the primary motivation was the need for a platform-independent (that is, architecture
-neutral) language that could be used to create software to be embedded in various consumer
electronic devices, such as microwave ovens and remote controls. As you can probably guess,
many different types of CPUs are used as controllers
The trouble with C and C++(and most other languages) is that they are designed to be compiled
for a specific target. Although it is possible to compile a C++ program for just about any type of CPU
,
to do so requires a full C++ compiler targeted for that CPU. The problem is that compilers are expensive
and time- consuming to create. An easier - and more cost – efficient – solution was needed. In an
attempt of find such a solution, Gosling and others began work on a portable, platform-independent
language that could be used to produce code that would run on a variety of CPUs under differing
environments. This effort ultimately led to the creation of Java.
Most programmers learn early in their careers that portable programs are as elusive as they are
desirable. While the quest for a way to create efficient, portable (plat form - independent) programs
is nearly as old as the discipline of programming itself, it had taken a back seat to other, more
pressing problems. Further, because much of the computer world had divided itself into the three
competing camps of Intel, Macintosh, and Unix, most programmers stayed within their fortified
boundaries, and the urgent need for portable code was reduced. However, with the advent of the
Internet and the Web, the old problem of portability returned with a vengeance. After all, the Internet
consists of a diverse, distributed universe populated with many types of computers, operating system
s
,
and CPUs. Even though many types of platforms are attached to the Internet, users would like them
all to be able to run the same program. What was once an irritation but low-priority had become a
high-profile necessity.