Choose Language

Thursday, 8 November 2012

3. Java Versions, Classification and Features


Java has several versions starting from 1.0 to the recent 1.7 (Current Version). From 1.0 to 1.4 there is not any more modifications.
Some of the new concepts added between versions 1.4 and 1.5. Some of them are as follows,
  • enum
  • varargs
  • For-each
  • Auto-Boxing and Unboxing
  • Generics

 Java Classification:
  • Application 
  • Applet
Java codes follows the expression "Write Once Run Anywhere", where the source is compatible with different platforms.

Application Program:
It executed inside the system and run under the layer of OS.
Applet Program:

It executed on the internet and runs on the Java supported Browser.

Special Features of Java:

Java is an object oriented Programming, but its not fully an Object Oriented Programming Language, since it supports primitive data types.
The following features made java has the most powerful and popular Language in the world
  • Simple
  • Architectural Neutral
  • Portable
  • OOPS
  • Robust
  • Multi-Threaded
  • Interpreted
  • Security
  • Dynamic
  • Distributed
  • High Performance


Java was designed to be easy for the professional programmer to learn and use effectively. Assuming that you have some programming experience, you will not find Java hard to master. If you already understand the basic concepts of object-oriented programming, learning Java will be even easier. Best of all, if you are an experienced C++ programmer, moving to Java will require very little effort. Because Java inherits the C/C++ syntax and many of the object-oriented features of C++, most programmers have little trouble learning Java. Object-Oriented
Although influenced by its predecessors, Java was not designed to be source-code compatible
with any other language.
If you are new to programming and doesn't carry the knowledge of C and C++, Its not an essential to know about those languages while learning Java because java is entirely different from C / C++.


The multiplatformed environment of the Web places extraordinary demands on a program, because the program must execute reliably in a variety of systems. Thus, the ability to create robust programs was given a high priority in the design of Java. To gain reliability, Java restricts you in a few key areas to force you to find your mistakes early in program development. At the same time, Java frees you from having to worry about many of the most common causes of programming errors. Because Java is a strictly typed language, it checks your code at compile time. However, it also checks your code at run time.
To better understand how Java is robust, consider two of the main reasons for program failure: memory management mistakes and mishandled exceptional conditions (that is, run-time errors). Memory management can be a difficult, tedious task in traditional programming environments. For example, in C/C++, the programmer must manually allocate and free all dynamic memory (usage of Pointers). This sometimes leads to problems, because programmers will either forget to free memory that has been previously allocated or, worse, try to free some memory that another part of their code is still using. Java virtually eliminates these problems by managing memory allocation and deallocation for you. (In fact, deallocation is completely automatic, because Java provides garbage collection for unused objects.) Exceptional conditions in traditional environments often arise in situations such as division by zero or “file not found,” and they must be managed with clumsy and hard-to-read constructs. Java helps in this area by providing object-oriented exception handling. In a well-written Java program, all run-time errors should be managed by your program.
Java was designed to meet the real-world requirement of creating interactive, networked programs. To accomplish this, Java supports multithreaded programming, which allows you to write programs that do many things simultaneously. The Java run-time system comes with an elegant yet sophisticated solution for multiprocess synchronization that enables you to construct smoothly running interactive systems. Java’s easy-to-use approach to multithreading allows you to think about the specific behavior of your program, not the multitasking subsystem.


Java is designed for the distributed environment of the Internet because it handles TCP/IP protocols. In fact, accessing a resource using a URL is not much different from accessing a file. Java also supportsRemote Method Invocation (RMI).This feature enables a program to invoke methods across a network.

Architecture of Java:

A central issue for the Java designers was that of code longevity and portability. One of the main problems facing programmers is that no guarantee exists that if you write a programtoday, it will run tomorrow—even on the same machine. Operating system upgrades, processor upgrades, and changes in core system resources can all combine to make a program malfunction. The Java designers made several hard decisions in the Java language and the Java Virtual Machine in an attempt to alter this situation. 
Their goal was “write once; run anywhere, any time, forever.” To a great extent, this goal was accomplished. Interpreted and High Performance.
The key that allows Java to solve both the security and the portability problems just described is that the output of a Java compiler is not executable code. Rather, it is byte-code.Bytecode is a highly optimized set of instructions designed to be executed by the Java run-time system, which is called the Java Virtual Machine (JVM). In essence, the original JVM was designed as an interpreter for bytecode. This may come as a bit of a surprise since many modern languages are designed to be compiled into executable code because of performance concerns. However, the fact that a Java program is executed by the JVM helps solve the major problems associated with web-based programs.

It has the following Key steps
  • Java program
  • Java class File  [Java compiler converts the code to class files]
  • Java Application Programming Interface (API)
  • Java Virtual Machine [Our program run in this JVM]

As you are likely aware, every time you download a “normal” program, you are taking a risk, because the code you are downloading might contain a virus, Trojan horse, or other harmful code. At the core of the problem is the fact that malicious code can cause its damage because it has gained unauthorized access to system resources. For example, a virus program might gather private information, such as credit card numbers, bank account balances, and passwords, by searching the contents of your computer’s local file system. In order for Java to enable applets to be downloaded and executed on the client computer safely, it was necessary to prevent an applet from launching such an attack.

Portability is a major aspect of the Internet because there are many different types of computers and operating systems connected to it. If a Java program were to be run on virtually any computer connected to the Internet, there needed to be some way to enable that program to execute on different systems. For example, in the case of an applet, the same applet must be able to be downloaded and executed by the wide variety of CPUs, operating systems, and browsers connected to the Internet. It is not practical to have different versions of the applet for different computers. The same code must work on all computers. Therefore, some means of generating portable executable code was needed. As you will soon see, the same mechanism that helps ensure security also helps create portability.


Post a Comment

Trending Now. . .

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by RANDJITH | Bloggerized by Randjith - Subscribe to Learn in Tamil | coupon codes