Core Java - [Characteristics]

♠ Posted by Unknown in at 21:08

Characteristics of Java



1. Java Is Simple.

No language is simple, but the Java is a bit easier compared to the popular object-oriented programming language c++, which has been the dominant software development language. Java is partially modeled after C++, but greatly simplified and improved. For instance, pointer and multiple inheritance often make programming complicated.
Java replaced multiple inheritance in C++ whit a simple structure called interface, and eliminated pointers. Java uses automatic memory allocation and garbage collections, while C++ requires the programmer to allocate memory to collect garbage.


2. Java Is Object Oriented.


Object Oriented programming provides greater flexibility, modularity, and reusability. For years, object-oriented technology was perceived as elitist., requiring substantial investments in training and infrastructure. Java has a simple and clean structure to make programs easy to write and read. Java programs are extremely expressive in terms of the applications and designs.A Java program consists of one or more classes. Classes are arranged in a treelike hierarchy, so that a child class can inherit properties and behaviors from its parent class. Every Java class is a child class of a pre-defined class called Object. Java comes with an extensive set of pre-defined classes, group of packages. You can use them in your programs.


3. Java Is Distributed.

Distributed computing involves several computers on a network working together. Java is designed to make distributed computing easy. Networking capability is inherently integrated into Java. Writing network programs in Java is sending and receiving data to and from a file.


4. Compiled And Interpreted Language.


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 instruction 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 interpreted language.


Image: Java Compilation/Interpretation Chart

5. Java is Robust.
Robust means reliable. Java does not support pointers, for example, which eliminates the possibility of overwriting memory and corrupting data. Java has runtime exception-handling feature to provide programming support for robustness. Java has catch and respond to an exceptional situation so that the program can continue its normal execution and terminate gracefully when a runtime error occurs.

6. Java Is Architecture Neutral (Machine Independent).
The most remarkable feature of Java is that it is Architecture Neutral. You can write one program that runs on any platform with a Java Virtual Machine. The major OS vendors have adopted the Java Virtual Machine, and soon Java will run on all machines. Java’s initial success lies in its Web Programming capability. You can run Java Applets from a Web Browser, but Java is more than just a Web Applet. You can also run stand-alone Java applications directly from operating systems by using Java interpreter. Today, software vendors usually develop multiple versions of the same product to run on different platforms(Windows, OS/2, Macintosh, and various UNIX,VMS,and IBM main-frames). Using Java, the developers need to write only one version to run on all of the platforms.

7. Java Is Portable.
Java programs can run on any platform without having to be recompiled. This is one positive aspect of portability. In Java, the size of the integer is the same on every machine, as is the behavior of arithmetic. Having a fixed size of numbers makes the program portable. The Java environment itself is portable to new hardware and operating systems. In fact, the Java compilers itself is written in Java.

8. Java Is Multithreaded.
Multithreading is the capability for a program to perform several tasks simultaneously within a program. For example, downloading a video file while playing the video would be considered multithreading. Multithreading programming is smoothly integrated in Java. In other languages, you have to call operating system-specific procedures to enable multithreading.

9. Java Is Dynamic.
Java was designed to adapt to an evolving environment. You can freely add new methods and properties in a class without affecting their clients. The original client program that uses the class that remains the same. Also at runtime, Java loads classes as they are needed.

0 comments:

Post a Comment