Java | Features

05 min read

Features of Java:

 

  • Simple, small and familiar - Java inherits C and C++ syntax and many other object-oriented features of C++. Hence, easy to learn Java. Redundant or sources of unreliable code are not part of Java. For example, no pointers, no preprocessor header files, no goto, no operator overloading and multiple inheritances.
  •  Secure: An applet program that downloads and executes automatically on the client computer must be prevented from doing harm to that machine. Java achieves this protection by confining an applet only to the Java execution environment and not allowing it access to other parts of the computer.
  • Portable: Java programs can be easily moved from one computer system to another, anywhere and anytime. WORA - Write Once, Run Anywhere, forever. Portability can be achieved by two things. They are generating bytecode that can be implemented on any other machine and sizes of the primitive data types are machine independent.
  • Robust: Java is designed as garbage collected language relieving the programmers, from virtually all memory management problems. Thus, deallocation of unused objects is completely automatic.
  • Multi-threaded: Handling multiple tasks simultaneously is called multithreading. Java supports multi-threaded programs. This improves the interactive performance of graphical applications.
  • High Performance: Java bytecode is carefully designed in such a way that it would be easy to translate directly into native machine code for very high performance by using a Just-in-Time compiler, without losing the benefits of platform-independent code.
  • Interpreted: Java is both compiled and interpreted.
  • Distributed: Java was designed for the distributed environment of the internet as it handles TCPIP protocols. It has the ability to share both data and programs. It allows multiple programmers from different locations to collaborate and work on a single project.
  • Dynamic: Java supports functions written in C and C++ called native methods. This facility allows the programmers to use the efficient functions available in these languages. Native methods are linked dynamically at runtime.
  • Servlets: Java on the server side is called servlets. Servlet is a small program that executes on the server. as applets dynamically extend the functionality of a web browser, servlets dynamically extend the functionality of a web server. Servlet's performance is higher than CGI in this regard. They are highly portable.
POST A NEW COMMENT
     
  • Input (stdin)

    Output (stdout)


    Input (stdin)

    Your Output (stdout)

    Expected Output

    Compiler Message

    Input (stdin)

    2    3

    Your Output (stdout)

    5

    Expected Output

    5

    Compiler Message

    5

    Error