Posted By:
1 Feb, 2014 12:50 am PST

Capabilities of Java

 JAVA Features

The inventors of Java wanted to design a language which could offer solutions to some of the problems encountered in modern programming. They wanted the language to be not only reliable, portable, and distributed but also simple, compact and interactive. Sun Microsystems officially describes Java with the following attributes:

1.       Compiled and interpreted: 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 bytecodeinstructions. Bytecodes are not machine instructions 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 an interpreted language.

2.      Platform-independent and Portable: The most significant contribution of Java over other languages is its portability. Java programs can be easily moved from one computer system to another, anywhere and anytime. Changes and upgrades in operating systems, processors and system resources will not force any changes on Java programs. This is the reason why Java has become a popular language for programming on Internet which interconnects different kinds of systems worldwide. We can download a Java applet from a remote computer onto our local system via internet and execute it locally. This makes the Internet an extension of the user’s basic system providing practically unlimited number of accessible applets and applications.

Java ensures portability in two ways. First, Java compiler generates bytecode instructions that can be implemented on any machine. Secondly, the size of the primitive data types is machine-independent.

3.   Object-Oriented: Java is a true object-oriented language. Almost everything in Java is an object. All program code and data reside within objects and classes. Java comes with an extensive set of classes, arranged in packages that we can use in our programs by Inheritance. The object model in Java is simple and easy to extend.

4.   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 exception handling which captures serious 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 everywhere. 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 program cannot gain access to memory locations without proper authorizations.

5.   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 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.

6.   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, pre-processor header files, goto statement and many others. It also eliminates operator overloading and multiple inheritance.

Familiarity is another striking feature of Java. To make the language look familiar to the existing programmers, it was modelled 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++.

7.   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 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. The feature greatly improves the interactive performance of graphical applications.

The Java runtime comes with tools that support multi process synchronization and construct smoothly running interactive systems.

8.   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 reduced overheads during runtime. Further, the incorporation of multithreading enhances the overall execution speed of Java programs.

9.   Dynamic and Extensible: Java is a dynamic language. Java is capable of dynamically linking in new class libraries, methods, and 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. 

Benefits of JAVA

Java offers several benefits to both the program designer and the user. Object-orientation contributes to the solution of many problems associated with the development and quality of software products. The new technology promises greater programmer productivity, better quality of software and lesser maintenance cost. The principal advantages are:

·  Through inheritance, we can eliminate redundant code and extend the use of existing classes.

· We can build programs from the standard working modules that communicate with one another, rather than having to start writing the code from the scratch. This leads to saving of development time and higher productivity.

· The principle of data hiding helps the programmer to build secure programs that cannot be invaded by code in other parts of the program.

· It is possible to have multiple objects to co-exist without any interference.

· It is possible to map objects in the problem domain to those objects in the program.

· It is easy to partition the work in a project based on objects.

· The data-centred design approach enables us to capture more details of a model in an implementable form.

· Object-orientation systems can be easily upgraded from small to large systems

· Message passing techniques for communication between objects make the interface descriptions with external systems much simpler.

· Software complexity can be easily managed.

Applications of Java

The most popular application of Java, up to now, has been in the area of user interface design such as windows. There are hundreds of windowing systems developed using OOP techniques.

Real business systems are often much more complex and contain many more objects with complicated attributes and methods. OOP is useful in this type of applications because it can simplify a complex problem. The promising areas for application of Java include:

  •  Real-time systems
  • Simulation and modelling
  • Object-oriented databases
  • Hypertext, hypermedia and expertext
  • AI and expert systems
  • Neural networks and parallel programming
  • Decision support and office automation systems
  • CIM/CAD/CAD system

It is believed that the richness of OOP environment will enable the software industry to improve not only the quality of software systems but also its productivity.

Java enables us to play online games, video, audio, chat with people around the world, Banking Application, view 3D image and Shopping Cart. Java finds its extensive use in the intranet applications and other e-business solutions that are the grassroots of corporate computing.  Java is regarded as the most well described and planned language to develop applications for the Web.

 



FEATURES OF JAVA

 

There are many given features of java. The features are given below and we shall see them one by one.

1.  Simple

2.  Object-Oriented

3.  Platform independent

4.  Secured

5.  Compiled and Interpreted

6.  Robust

7.  Portable

8.  Dynamic

9.  Interpreted

10. High Performance

11. Multithreaded

12. Distributed

 

  I.  SIMPLE:

According to Sun, Java language is simple because:
1. Syntax is based on C++ (so easier for programmers to learn it after C++).
2. Removed many confusing and/or rarely-used features e.g., explicit pointers, operator overloading etc.
3. No need to remove unreferenced objects because there is Automatic Garbage Collection in java 

 

 II.  OBJECT ORIENTED

1. Object-oriented means we organize our software as a combination of different types of objects that incorporates both data and behaviour.
2. Object-oriented programming(OOPs) is a methodology that simplify software development and maintenance by providing some rules.

Basic concepts of OOPs are:

  1. Object
  2. Class
  3. Inheritance
  4. Polymorphism
  5. Abstraction
  6. Encapsulation

III. PLATFORM INDEPENDENT


A platform is the hardware or software environment in which a program runs. There are two types of platforms software-based and hardware-based. Java provides software-based platform. The Java platform differs from most other platforms in the sense that it's a software-based platform that runs on top of other hardware-based platforms.It has two components:
        1.    Runtime Environment
        2.    API(Application Programming Interface)

Java code can be run on multiple platforms e.g.Windows,Linux,Sun Solaris,Mac/OS etc. Java code is compiled by the compiler and converted into bytecode.This bytecode is a platform independent code because it can be run on multiple platforms i.e. Write Once and Run Anywhere(WORA).

 

IV. SECURED

Java is secured because:
1. No explicit pointer
2. Programs run inside virtual machine sandbox.


V. COMPILED AND INTERPRETED

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 instructions 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 an interpreted language.

VI. ROBUST

Robust simply means strong. Java uses strong memory management. There are lack of pointers that avoids security problem. There is automatic garbage collection in java. There is exception handling and type checking mechanism in java. All these points makes java robust.

VII. PORTABLE

The most significant contribution of Java over other languages is its portability. Java programs can be easily moved from one computer system to another, anywhere and anytime. Changes and upgrades in operating systems, processors and system resources will not force any changes on Java programs. This is the reason why Java has become a popular language for programming on Internet which interconnects different kinds of systems worldwide. Java ensures portability in two ways. First, Java compiler generates bytecode instructions that can be implemented on any machine. Secondly, the size of the primitive data types is machine-independent.

 

VIII. HIGH PERFORMANCE

Java is faster than traditional interpretation since byte code is "close" to native code still somewhat slower than a compiled language (e.g., C++)

 

IX. DISTRIBUTED

We can create distributed applications in java. RMI and EJB are used for creating distributed applications. We may access files by calling the methods from any machine on the internet.

 

X. MULTI- THREADED

A thread is like a separate program, executing concurrently. We can write Java programs that deal with many tasks at once by defining multiple threads. The main advantage of multi-threading is that it shares the same memory. Threads are important for multi-media, Web applications etc.

 

BENEFITS OF JAVA

 

The most popular application of Java, up to now, has been in the area of user interface design such as windows. There are hundreds of windowing systems developed using OOP techniques. 

Real business systems are often much more complex and contain many more objects with complicated attributes and methods. OOP is useful in this type of applications because it can simplify a complex problem. The promising areas for application of Java include:

o   Real-time systems

o  Simulation and modelling

o  Object-oriented databases

o  Hypertext, hypermedia and expertext

o AI and expert systems

o  Neural networks and parallel programming

o Decision support and office automation systems

o CIM/CAD/CAD system

 

Was it useful?  




Please login to reply to this problem.