FEATURES OF JAVA
There are many given features of java. The features are given below and we shall see them one by one.
3. Platform independent
5. Compiled and Interpreted
10. High Performance
According to Sun, Java language is simple because:
1. Syntax is based on C++ (so easier for programmers to learn it after C++).
2. Removed many confusing and/or rarely-used features e.g., explicit pointers, operator overloading etc.
3. No need to remove unreferenced objects because there is Automatic Garbage Collection in java
II. OBJECT ORIENTED
1. Object-oriented means we organize our software as a combination of different types of objects that incorporates both data and behaviour.
2. Object-oriented programming(OOPs) is a methodology that simplify software development and maintenance by providing some rules.
Basic concepts of OOPs are:
III. PLATFORM INDEPENDENT
A platform is the hardware or software environment in which a program runs. There are two types of platforms software-based and hardware-based. Java provides software-based platform. The Java platform differs from most other platforms in the sense that it's a software-based platform that runs on top of other hardware-based platforms.It has two components:
1. Runtime Environment
2. API(Application Programming Interface)
Java code can be run on multiple platforms e.g.Windows,Linux,Sun Solaris,Mac/OS etc. Java code is compiled by the compiler and converted into bytecode.This bytecode is a platform independent code because it can be run on multiple platforms i.e. Write Once and Run Anywhere(WORA).
Java is secured because:
1. No explicit pointer
2. Programs run inside virtual machine sandbox.
V. COMPILED AND INTERPRETED
Usually a computer language is either compiled or interpreted. Java combines both these approaches thus making Java a two-stage system. First, Java compiler translates source code into what is known as bytecode instructions. Bytecodes are not machine instructions and therefore, in the second stage, Java interpreter generates machine code that can be directly executed by the machine that is running the Java program. We can thus say that Java is both a compiled and an interpreted language.
Robust simply means strong. Java uses strong memory management. There are lack of pointers that avoids security problem. There is automatic garbage collection in java. There is exception handling and type checking mechanism in java. All these points makes java robust.
The most significant contribution of Java over other languages is its portability. Java programs can be easily moved from one computer system to another, anywhere and anytime. Changes and upgrades in operating systems, processors and system resources will not force any changes on Java programs. This is the reason why Java has become a popular language for programming on Internet which interconnects different kinds of systems worldwide. Java ensures portability in two ways. First, Java compiler generates bytecode instructions that can be implemented on any machine. Secondly, the size of the primitive data types is machine-independent.
VIII. HIGH PERFORMANCE
Java is faster than traditional interpretation since byte code is "close" to native code still somewhat slower than a compiled language (e.g., C++)
We can create distributed applications in java. RMI and EJB are used for creating distributed applications. We may access files by calling the methods from any machine on the internet.
X. MULTI- THREADED
A thread is like a separate program, executing concurrently. We can write Java programs that deal with many tasks at once by defining multiple threads. The main advantage of multi-threading is that it shares the same memory. Threads are important for multi-media, Web applications etc.
BENEFITS OF JAVA
The most popular application of Java, up to now, has been in the area of user interface design such as windows. There are hundreds of windowing systems developed using OOP techniques.
Real business systems are often much more complex and contain many more objects with complicated attributes and methods. OOP is useful in this type of applications because it can simplify a complex problem. The promising areas for application of Java include:
o Real-time systems
o Simulation and modelling
o Object-oriented databases
o Hypertext, hypermedia and expertext
o AI and expert systems
o Neural networks and parallel programming
o Decision support and office automation systems
o CIM/CAD/CAD system