Java Features and Utilities
Java Features and Utilities
Everyone who has ever heard about programming knows that java is among the leading programming languages. Java is increasing in popularity every passing year because of its impressive features.
Let’s take a look at the top features of java that make java a favourite to developers.
Features of java:
1. Great Performance:
The java compiler is designed for performance. Java code is compiled into byte code and then compiled by the java compiler. It is fed to the JVM (Java Virtual Machine) before it’s converted to machine level code.
2. Inspired by c and c++:
C and C++ are long-tenured programming languages and they are the ancestors of the modern programming languages like Java and Python. Java is a bit similar to C and C++ but doesn’t have features such as pointers and multiple inheritance. Therefore, having an understanding of C and C++ is useful in learning java.
3. Multi-threaded:
Multithreading capabilities come built right into java language. This means it is possible to build highly interactive and responsive apps with a number of concurrent thread of activity.
4. Platform independence:
Java has a philosophy called WORA (Writing once, Run anywhere) . Java code is compiled into an intermediate format called Byte code, which is to be executed in the JVM (Java Virtual Machine). Any system that runs a JVM is able to execute the java code.
5. Truly Object Oriented:
Build upon C++ which is object-oriented, Java extends functionally to become a fully object oriented programming language. Some of the most important features that makes it object oriented are:
A. Abstraction
B. Encapsulation
C. Inheritance
D. Polymorphism
6. Simple:
Java is designed to be easy to learn. If you understand the basic concept of OOP java, it would be easy to master.
7. Secure:
With this feature of java it will be easy to enable to develop virus-free, tamper-free systems.
8. Portable:
There is no strict architectural and implementation dependency. The java compiler is written with a very clear boundary for portability using ANSI C.
9. Robust:
Java makes an effort to eliminate error situation by emphasizing mainly on compile time error checking and runtime checking.
10. High Performance:
With the use of Just-In-Time compilers, Java enables high performance.
11. Interpreted:
The development process is more rapid and analytical since the linking is an incremental and light-weight process.
12. Robust:
Java makes an effort to eliminate error-phone situation by emphasizing mainly on compile time error checking and runtime checking.
13. Dynamic:
Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment.
14. Distributed:
Java is designed for the distributed environment of the internet.
Utilities of Java:
Utility class is, also known as Helper class, is a class , which contains just static methods. It is stateless and cannot be instantiated.
Implementation:
Utility class is usually declared final, so it cannot be subclassed. The constructor is declared as private with an explaining comment and even possible exception when invoked. With a private constructor declared, the default one is not generated and class cannot be initiated by other classes.
Example:
Public final class UtilityClass {
// Private constructor to prevent instantiation
private UtilityClass() {
throw new
UnsupportedOperationException();
}
//public static methods here}
Thank You