ShowTutorials.com

Refreshing your ideas and broadening your visions


Features of Java

 

features-of-java

 

Object Oriented

In Java, everything is an Object. Java can be easily extended since it is based on the Object model.

 

Platform Independent

Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into platform specific machine, rather into platform-independent byte code. This byte code is distributed over the web and interpreted by the Virtual Machine (JVM) on whichever platform it is being run on.

 

Simple

Java is designed to be easy to learn. If you understand the basic concept of OOP Java, it would be easy to master.

 

Secure

With Java’s secure feature it enables to develop virus-free, tamper-free systems. Authentication techniques are based on public-key encryption.

 

Architecture-neutral

Java compiler generates an architecture-neutral object file format, which makes the compiled code executable on many processors, with the presence of Java runtime system.

 

Portable

Being architecture-neutral and having no implementation dependent aspects of the specification makes Java portable. The compiler in Java is written in ANSI C with a clean portability boundary, which is a POSIX subset.

 

Robust

Java makes an effort to eliminate error-prone situations by emphasizing mainly on compile time error checking and runtime checking.

 

Multi-threaded

With Java’s multi-threaded feature it is possible to write programs that can perform many tasks simultaneously. This design feature allows the developers to construct interactive applications that can run smoothly.

 

Interpreted

Java byte code is translated on the fly to native machine instructions and is not stored anywhere. The development process is more rapid and analytical since the linking is an incremental and light-weight process.

 

High Performance

With the use of Just-In-Time (JIT) compilers, Java enables high performance.

 

Distributed

Java is designed for the distributed environment of the internet.

 

Dynamic

Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry an extensive amount of run-time information that can be used to verify and resolve accesses to objects at run-time.

 

Object-Oriented Programming

Object-oriented programming (OOP) is at the core of Java. In fact, all Java programs are to at least some extent object-oriented. OOP is so integral to Java that it is best to understand its basic principles before you begin writing even simple Java programs.

All computer programs consist of two elements: code and data. Furthermore, a program can be conceptually organized around its code or around its data. That is, some programs are written around what is happening and others are written around who is being affected. These are the two paradigms that govern how a program is constructed. The first way is called the process-oriented model. The process-oriented model can be thought of as code acting on
data. Procedural languages such as C employ this model to considerable success. However, problems with this approach appear as programs grow larger
and more complex.

To manage increasing complexity, the second approach, called object-oriented programming, was conceived. Object-oriented programming organizes a program around its data (that is, objects) and a set of well-defined interfaces to that data. An object-oriented program can be characterized as data controlling access to code.

 

The Three OOP Principles (P.I.E.)

All object-oriented programming languages provide mechanisms that help you implement the object-oriented model. They are polymorphism, inheritance and encapsulation (PIE)

 

Polymorphism

Polymorphism (from Greek, meaning many forms) is a feature that allows one interface to be used for a general class of actions. The specific action is determined by the exact nature of the situation

 

Inheritance

Inheritance is the process by which one object acquires the properties of another object. This is important because it supports the concept of hierarchical classification. Most knowledge is made manageable by hierarchical (that is, top-down) classifications.

 

Encapsulation

Encapsulation is the mechanism that binds together code and the data it manipulates, and keeps both safe from outside interference and misuse. One way to think about encapsulation is as a protective wrapper that prevents the code and data from being arbitrarily accessed by other code defined outside the wrapper. Access to the code and data inside the wrapper is tightly controlled through a well-defined interface.

We will discuss these topics in more details in later chapters.


Latest Topics: