Java Features or Buzz words



Download 190.08 Kb.
Page2/2
Date05.05.2018
Size190.08 Kb.
#48263
1   2

Portable:-

Portable in terms of JAVA means Write Once Run Anywhere (WORA) means Applications written using Java are portable in the sense that they can be executed on any kind of computer containing any CPU or any operating system. When an application written in Java is compiled, it generates an intermediate code file called as “bytecode”. Bytecode helps Java to achieve portability. This bytecode can be taken to any computer and executed directly.

Bytecode is a new term to the programming world introduced by Java. The compilation product of Java source file is a .class file consisting of bytecode. This bytecode makes Java portable and platform-independent where as the binary code of C/C++ makes C/C++ platform-dependent.

The bytecode is not an ultimate format that is readily understood by the microprocessor. It must be converted into binary code format that can be processed by the microprocessor directly. This conversion is taken care by the JVM. The format conversion takes some time and thereby Java executes slower. In case of C/C++, they contain binary code directly. The slow nature is overcome to some extent with the introduction of JIT (Just-In-Time) compiler. Following figure gives the concept.





Object-Oriented:-

Java is object oriented programming language but everything in Java is not object. Java manages to maintain balance and adopted what make sense in the current situation. The object oriented model in Java is simple and easy to extend and also the primitive types such as integers, are retained for high-performance. Java manages to strike a balance between the purists’s “everything is an object” paradigm and the pragmatist’s “stay out of my way” model. The object model in java is simple and easy to extend, while simple types, such as integers, are kept as high-performance non-objects. Java cannot exist outside a class. Java comes with an extensive set of built-in classes, arranged in "packages" that are "imported" for use in a program.



Robust:-

Java is highly reliable because of its strong typing, its explicit method declarations, its lack of explicit pointers, and its good exception-handling facilities. 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.



Multithreaded:-

A thread is a program’s path of execution. In any programming problems, when multiple Events or actions need to occur at the same time. Multithreaded applications deliver their potent power by running many threads. Java supports multithreaded programming, which allows you to write programs that do many things simultaneously. Java is inherently multi-threaded, for example garbage collection subsystem runs as a low-priority thread. A single Java program can have many different threads executing independently and continuously, Because multithreaded applications share data and all threads of an application exists in the same data space therefore for maintaining reliability is sometime difficult. To make easy the use of threads Java offers features for synchronization between threads.





Architecture-neutral:-

The major challenge when Java was developing is to have programming language with which a program can be developed and executed anytime in future. With changing environments of hardware, processor, Operating system there was needed to have program still adopt to this architecture changes. Java code does not depend on the underlying architecture and only depends on it JVM thus accomplish the architecture neutral programming language. the Java compiler generates an intermediary bytecode that must be again converted into binary code at execution time. This binary code conversion is effected by the JVM. The bytecode is OS architecture neutral. Any OS can execute the bytecode without bothering its architecture. Interpreted



High Performance:-

When java programs are executed, JVM does not interpret entire code into machine instructions. If JVM attempts to do this then there will huge performance impact for the high complexity programs. JVM was intelligently developed to interpret only the piece of the code that is required to execute and untouched the rest of the code. The performance of java is never questioned compared with another programming language. In Java first compile the program, then execute it using the Java interpreter. In general, interpreters are slow, because an interpreter executes program instruction by instruction while Java is a fast-interpreted language. Java has also been designed so that the run-time system can optimize their performance by compiling byte code to native machine code on the fly (execute immediately after compilation).



Distributed:-

Java is created for supporting distributed environment of the Internet because it support various types of Protocols means in Networking Distributed environment is also facilitate by Java. Java has a feature called Remote Method Invocation (RMI) using which a program can invoke method of another program across a network and get the output. It has ability to share both data and programs. Java applications can open and access remote objects on internet as easily they can do in a local system .This enables multiple programs at multiple remote locations to collaborations and work together on a single project. No language can parallel Java in networking support. Java supports both LAN programming (TCP/IP and UDP) and distributed programming.





Automatic Garbage Collection:-

They added automatic garbage collection, thereby simplifying the task of Java programming but making the system somewhat more complicated. A common source of complexity in many C and C++ applications is storage management: the allocation and freeing of memory. By virtue of having automatic garbage collection (periodic freeing of memory not being referenced) the Java language not only makes the programming task easier, it also dramatically cuts down on bugs.


Dynamic:-

Java programs carry with them substantial amounts of run-time type information that is used to verify and resolve accesses to objects at run time. This makes it possible to dynamically link code in a safe and expedient manner. This is crucial to the robustness of the applet environment, in which small fragments of bytecode may be dynamically updated on a running system. Generally in coding, one class may require the functionality of another class. At runtime, JRE can search, hook and load the necessary classes required for the smooth execution of the program. Do not bother where the files are, may be on your own local disk or in a server at a far off place, JRE knows well how to play the game dynamically. Java has got built-in support for many protocols like HTTP and FTP using which the JRE can download the classes, files and libraries required for the execution of a program.
Download 190.08 Kb.

Share with your friends:
1   2




The database is protected by copyright ©ininet.org 2024
send message

    Main page