Robust and Secure
Java is a robust language. It provides many safeguards to ensure reliable code. It has strict compile time and run time checking for data types. It is designed as a garbage-collected language relieving the programmers virtually all memory management problems. Java also incorporates the concept of programmers virtually which captures series errors and eliminates any risk of crashing the system.
Security becomes an important issue for a language that is used for programming on internet. Threat of viruses and abuse of resources are every where. Java systems not only verify all memory access but also ensure that no viruses are communicated with an applet. The absence of pointers in Java ensures that programs cannot gain access to memory locations without proper authorization.
Distributed
Java is designed as a distributed language for creating applications on networks. It has the ability to share both data and programs. Java applications can open and access remote objects on Internet as easily as they can do in a local system. This enables multiple programmers at multiple remote locations to collaborate and work together on a single project.
Simple, Small and Familiar
Java is a small and simple language. Many features of C and C++ that are either redundant or sources of unreliable code are not part of java. For example, Java does not use pointers, preprocessor header files, go to statement and many others. It also eliminates operator overloading and multiple inheritance. For more detailed comparison of Java with C and C++, refer to section 2.3.
Familiarity is another striking feature of Java. To make the language look familiar to the existing programmers, it was modeled on C and C++ languages. Java uses many constructs of C and C++ and therefore, Java code “looks like a C++” code. In fact, Java is a simplified version of C++.
Multithreaded and Interactive
Multithreaded means handling multiple tasks simultaneously. Java supports multithreaded programs. This means that we need not wait for the application to finish one task before beginning another. For example, we can listen to an audio clip while scrolling a page and at the same time download an applet from a distant computer. This feature greatly improve the interactive performance of graphical applications.
The java runtime comes with tools that support multiprocess synchronization and construct smoothly running interactive systems.
High Performance
Java performance is impressive for an interpreted language, mainly due to the use of intermediate bytecode. According to Sun, Java speed is comparable to the native C/C++. Java architecture is also designed to reduce overheads during runtime. Further, the incorporation of mutlireading enhances overall execution speed of Java programs.
Dynamic and Extensible
Java is a dynamic language. Java is capable of dynamically linking new class libraries, methods, are objects. Java can also determine the type of class through a query, making it possible to either dynamically link or abort the program, depending on the response.
Java programs support functions written in other languages such as C and C++. These functions are known as native methods. This facility enables the programmers to use the efficient functions available in these languages. Native methods are linked dynamically at runtime.
Ease of Development
Java 2 Standard Edition (J2SE) 5.0 supports features, such as Generics, Enhanced for Loop Autoboxing or unboxing, Typesafe Enums, Varargs, Static import and Annotation. These features reduce the work of the programmer by shifting the responsibility of creating the reusable code to the compiler. The resulting source code is free from bugs because the errors made by the compiler are less when compared to those made by programmers. Thus, each of the linguistic features is designed to develop java programs in an easier way.
Scalability and Performance
J2SE 5.0 assures a significant increase in scalability and performance by improving the startup time and reducing the amount of memory used in Java 2 runtime environment. For example, the introduction of the class, data sharing in the Hotspot Java Virtual Machine (JVM) improves the startup time by loading the core classes from the jar files into a shared archive. Memory utilization is reduced by sharing data in the shared archive among multiple JVM processes. In the earlier versions, the data was replicated in each JVM instance.
Monitoring and Manageability
Java supports a number of APIs, such as JVM Monitoring and Management APIM Sun Management Platform Extension, Logging, Monitoring and Management Interface, and Java Management Extension ( JMX) to monitor and manage Java application level and JVM level when deploying a large application. Java provides tools, such as jconsole, jps, jstat and jstatd to make use of monitoring and management facilities. For example, GUI based tool called jconsole is used to monitor the JVM.
Desktop Client
J2SE 5.0 provides enhanced features to meet the requirements and challenges of the java desktop users. It provides an improved Swing look and feel called Ocean. This features is mainly used for developing graphics applications that require OpenGL hardware acceleration.