Java Characteristics

Bookmark
In this lesson you will learn about the characteristics of Java. They are defined by buzzwords like simple. object-oriented, robust, portable, etc.
[1] JAVA: A simple, object oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high performance, multithreaded, dynamic language.

This is how the father of Java, James Gosling defined the characteristics of Java in his paper published on February, 1995.This statement essentially summarizes the goal of Java as a programming language to serve a developer. In the referenced paper [1], the characteristics are summarized and we will revisit them here.

java-characteristics

Simple

Paradoxically, we were able to simplify the programming task by making the system somewhat more complicated. A good example of a common source of complexity in many C and C++ applications is storage management: the allocation and freeing of memory. JAVA does automatic garbage collection —this not only makes the programming task easier, it also dramatically cuts down on bugs.

Java takes care of the mundane system oriented tasks and simplifies job of the programmer. As quoted, programmer need not worry about object memory allocation and de-allocation as in the case of C. Java provides lots of tools, and a good focus on developers by the developers of Java well rounds this characteristic.

Object Oriented

The object-oriented facilities of JAVA are essentially those of C++, with extensions for more dynamic method resolution that came from Objective C.

One popular well know characteristic of Java is that it supports object oriented programming (OOP). Most of the object oriented feature implementations are emulated from C++ and they are improvised with reference from other languages like Objective C. One major difference between Java and C++ in respect to OOP is, that there is no support for multiple inheritance in Java. It was removed for the sake of simplicity. Like this there are tradeoffs in the implementation of OOP principles in Java. On the whole, it provides a powerful edge for the programmers to develop complex systems using the modern programming principles.

Distributed

JAVA now has a very extensive library of routines for easily coping with TCP/IP protocols like http and ftp. JAVA applications can open and access objects across the net via URLs with the same ease the programmers are used to accessing a local file system.

A programmer can do network programming with ease. Calls to remote objects are made easy with good system level support. From the early days of Java, the API library support for network programming is extensive. 

Robust

JAVA is intended for writing programs that need to be reliable in a variety of ways. There is a lot of emphasis on early checking for possible problems, later dynamic (runtime) checking, and on eliminating situations which are error prone.

Java has got good compiler. Many issues can be detected and fixed at the compilation level itself. Memory model emulated by Java has a great advantage over C and other languages. Corrupting the memory is one of the major cause of unstable applications. The way Java is designed does not allow the programmer to manipulate objects at memory level and this eliminates the probability of most of the regular memory related handling issues.

Secure

JAVA is intended to be used in networked/distributed situations. Toward that end a lot of emphasis has been placed on security. JAVA enables the construction of virus-free, tamper-free systems.

In java security policy handling, object property access restrictions and memory handling model covers major aspect of the security. Programs cannot corrupt the memory from outside its scope. Security policy enforces permission for i/o handling. These kind of basic security mechanism ensures security at grass root level for applications.

Architecture Neutral

JAVA was designed to support applications on networks. In general, networks are composed of a variety of systems with a variety of CPU and operating system architectures. In order for an JAVA application to be able to execute anywhere on the network, the compiler generates an architecture neutral object file format — the compiled code is executable on many processors, given the presence of the JAVA runtime

Java is compiled and interpreted both. This allows the ability to generate intermediate objects that are not dependent on any specific architecture. Java compiler generate bytecode instructions targeted for Java virtual machine. That can be used on any machine and translated at runtime as per the need.

Portable

Being architecture neutral is a big chunk of being portable, but there is more to it than just that. Unlike C and C++ there are no "implementation dependent" aspects of the specification.

Portability is the super set of architecture neutral. This is the most celebrated characteristic of Java and one of the major reason for success of Java in this modern era. Applications are required to run a variety of systems. The emergence of Internet of Things (IOT), cards, micro and ubiquitous devices makes Java as one of the forerunner in the current era of programming.

Interpreted

The JAVA interpreter can execute JAVA bytecodes directly on any machine to which the interpreter has been ported. And since linking is a more incremental & lightweight process, the development process can be much more rapid and exploratory.

Java has a two phase model for source code to execution. Compilation translates source code to intermediate binary format and then the interpreter executes it. Interpreter also has a just-in-time compiler which improves the efficiency of the executable code.

High Performance

While the performance of interpreted bytecodes is usually more than adequate, there are situations where higher performance is required. The byte code can be translated on the fly (at runtime) into machine code for the particular CPU the application is running on.

Over the years, just-in-time (JIT) compiler has improved the performance of Java applications. JIT does observes the code at runtime and does optimization on the executable instructions.

Multithreaded

JAVA has a sophisticated set of synchronization primitives that are based on the widely used monitor and condition variable paradigm.

Specialty of multithreading in Java is ease of experience in implementing it. You will not believe it till you experience it. This is again one of the best characteristic of Java language.

Dynamic

In a number of ways, JAVA is a more dynamic language than C or C++. It was designed to adapt to an evolving environment.

Java provides good support for runtime analysis of the application. We get to know the detailed behaviour of the objects and their system at runtime. This allows space for better understanding of our application and improve it.

References

[1] Java: an Overview - James Gosling, February 1995.

Exception Occured:

TypeErrorException
Messageerror_log(app.log): Failed to open stream: Permission denied
File/home/dh_czz6eb/tutorialwalk.com/common/error.php
Line36
Trace#0 (): log_error(2, 'error_log(app.log): Failed to open stream: Permission denied', '/home/dh_czz6eb/tutorialwalk.com/common/error.php', 36)
#1 /home/dh_czz6eb/tutorialwalk.com/common/error.php(36): error_log('21-12-2024 22:25:36 pm (IST),/home/dh_czz6eb/tutorialwalk.com/common/common.php,193,0,ErrorException,Optional parameter $per_page declared before required parameter $href is implicitly treated as a required parameter,/java/java-characteristics.html,#0 /home/dh_czz6eb/tutorialwalk.com/common/error.php(115): log_error(8192, 'Optional parame...', '/home/dh_czz6eb...', 193)
#1 [internal function]: check_for_fatal()
#2 {main}
', 3, 'app.log')
#2 /home/dh_czz6eb/tutorialwalk.com/common/error.php(8): log_exception(ErrorException)
#3 /home/dh_czz6eb/tutorialwalk.com/common/error.php(115): log_error(8192, 'Optional parameter $per_page declared before required parameter $href is implicitly treated as a required parameter', '/home/dh_czz6eb/tutorialwalk.com/common/common.php', 193)
#4 (): check_for_fatal()
REQUEST_URI/java/java-characteristics.html