Friday, June 10, 2016

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 a Object Oriented programming language. C is 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 highly strong programming language. Why I'm saying Java is Robust ? Really Java provide both compile time and run time error checking mechanism. 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 new keyword to make object. That new returns a reference, not a pointer.

Java is Platform independent 

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.
  1. JVM (Java Virtual Machine)
  2. Java API (Application Programming Interface)
In my next post I'm gonna talk about JVM architecture. So I skip in this moment. Java API is a set of predefined large collection of ready made software components that can be used when creating Java applications.

Java gives High performance

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

Multi-threading and OOP concepts are described in previous posts. So I skip them for a moment.

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