DEV Community

Ravi Yasas
Ravi Yasas

Posted on

Why Java ?

What are the main features of Java?

  • Simple
  • Robust & Secure
  • Object-Oriented
  • Platform independent
  • High performance
  • Multi-threaded

Java is Simple

Before Java, "C" is the most powerful language. If you have worked with C, you may feel it is complex than Java, and also it is not an Object-Oriented programming language. C is a Structured oriented language. When Java is invented, is it very easy to understand. Because Java is less complex than C and other languages and it is easy to learn.

Java is Robust and Secure

Java is a highly strong programming language. Why I'm saying Java is Robust? Really Java provides both compile-time and run-time error checking mechanisms. It means there are two error checking gates to ensure your code is correct.

If you have any idea about C language, you may know, C is widely using pointers. But Java doesn't use pointers, it has References. Java is using a new keyword to make object. That new returns a reference, not a pointer.

Java is Platform independent

The platform is a hardware and software combination to run a program. For example Windows, Linux, macOS. But Java is a software-only platform, it means Java can be run in any hardware.

Java platform is a combination of two components

  • JVM (Java Virtual Machine)
  • Java API (Application Programming Interface)

Java gives High performance

Java is really built for high-performance application creation. Java is running on a virtual machine(JVM). You may feel it makes slow execution than native code. But Java's high-performance Virtual Machine and compiler gives the same performance as a native.

Which languages are used in Java ?

  • JVM - Sun JVM is written in C
  • Java compiler - Earlier C and C++, now Java
  • JRE - Written in C
  • Java libraries - Written in Java

Discussion (2)

Collapse
joseaugustodemelo profile image
José Augusto de Melo

I really liked your text! A hug!

Collapse
raviyasas profile image
Ravi Yasas Author

Thanks much :)