Java Buzzwords


Here are some terms that are used for java as its features:
Simple
Java syntax is similar to C and C++, however, most of the poorly used and confusing parts form the C++ are omitted or managed. For example pointer for handling memory in C or C++ is not there in Java and it handles memory automatically, and similarly, structs and typedef constructs are removed. So we say that Java is simple to learn and simple to implement.
Object Oriented
Java is a truly object-oriented programming language that supports objects, inheritance, and polymorphism. Since it is object oriented everything but the primitive data types is represented as class and its instances and members. 
Distributed
Since the inception of Java it was its goal to support for the connectivity among components. So, application development for running in multiple machines to run concurrently and interact with each other using java is very easy and efficient. 
Robust
The memory corruption danger provided by pointer in C and C++ is not there in Java since its ability to handle the memory by itself. Again robustness is provided by the power, to detect the errors and report it as soon as possible, that Java has.
Secure
Since Java was intended to work in distributed environment the security was the issue that was taken care. For example, applets running in a Web browser cannot access a Web client's underlying file system or any other Web site other than that from which it originated and all Java programs run in a virtual machine that protects the underlying operating system from harm. Similarly the series of test and restriction of memory manipulation also secure the application.
Architecture Neutral
Since Java runs inside of a Virtual Machine (a program written in operating system specific code that provides a common front-end to all operating systems) it in no way depends on the underlying operating system or hardware.
Portable
The phrase write once, run anywhere is the major concept for the portability that Java adheres by compiling Java code into byte-code, which then is interpreted by Virtual Machine to operating system–specific instructions. Because of this, any Java code that you write and compile into byte-code will run on any operating system for which there exists a compatible Virtual Machine.
Interpreted
Interpreted code tends to run much slower than fully compiled code, but Java gains some performance because it is partially compiled into byte-code.
High Performance
Though we say Java programs are interpreted, we cannot say that java does not have high performance. The performance gain is due to the JIT (Just In Time) compilation that cache the recurring process to speedup the interpretation.
Multithreaded
Java allows multithreading such that the applications have the capability to run multiple things at the same time for e.g. writing a report and checking the spellings at a time.
Dynamic
Java is dynamic since it is possible to dynamically link other classes and its instances. Again we can incorporate Java program with other languages like C and C++.




Java Virtual Machine

When java compiles a code then it converts the program into the special architectural neutral executable program called bytecode that can only be run by using the special program that acts as a machine called JVM (Java Virtual Machine). You must remember the fact that JVM is not an actual machine but the run time system for Java.

How Java Works

Here is the self descriptive diagram that shows how Java works.
 








Building Java Applications and Applets
There are two types of Java programs namely, java application (standalone) and the java applet. The former runs within the system as a standalone program without using help of other tools, whereas the latter requires html file to include the applet and run it. The figure below is the pictorial representation of creating and running the both type of programs as well as some other functions.

 












0 comments:

Post a Comment