The following Java features are very simple and easy to understand.
To develop a java program , it is very easy not a difficult task and easy to execute, that’s why java is simple. Whatever we write java program that should be understandable by every users, for this we can say java is portable.
Java is an object oriented language. Almost everything in java is an object. All program code and data reside within objects and classes.
We know that a programming language is either compiled or interpreted. But java combines both the approaches. That is why java is called a two stage system. First java compiler javac translates source code into an intermediate code known as byte code (.class file). But byte codes are not machine instructions. So it can't be executed by the processor. So in the second stage JVM(Java Virtual Machine) takes byte code and convert into convert into machine instruction, then JVM provides an execution engine that is java interpreter named as java execute the machine instructions. So here both both java compiler (javac) and java interpreter (java) are functioning. Hence we say java is both compiled and interpreted language.
The output of compilation of a java program is a .class file (byte code). Then JVM take the byte code and convert into machine instruction. So whatever the machine instruction is generated in windows operating system, same machine instruction will be generated in Unix, Mac, Solaris etc. For this reason Java is platform independent.
Java is robust due to the following three points.
Security is a vital issue for a programming language on internet. In general, viruses are present everywhere in a system. Java not only verify all memory access but ensure that no viruses are communicated with java programs. That means java programs cannot be affected by any type of viruses.
Multiple tasks executing simultaneously is known as multi-tasking. There are two types of multi-tasking, such as process based multi-tasking and thread based multi-tasking. The thread based multi-tasking is known as multi-threading. In a program different independent job(task) executing simultaneously is known as multi-threading. Each job is considered as one thread. Java supports the concept of multithreading which is the biggest advantage.
Java is a dynamic language. Java is capable of dynamically linking in new class libraries, methods and objects. While executing the java program the user can get the required fields dynamically from a local drive or from a computer thousands of miles away from the user just by connecting with the Internet. Another thing is whatever the memory allocation is required then we allocate memory dynamically that means using new operator we allocate memory dynamically. For example, an object creation, an array declaration etc.
Information is distributed on various computers over a network. We will write java programs which is distributed to the clients. This is possible because java can handle the protocols like TCP/IP and UDP.
One of the major problem facing programmers is that no guarantee exists that if you write a program today, it will run tomorrow, even on the same machine. The java designer made JVM to alter this situation. The goal was "write once run anywhere, anytime forever".❮ Previous Next ❯