Day1: Introduction to Java and its feature

Introduction to Java

Java is one of the most popular programming platform available in the market today and from the last 26 Years it is amongst the top 5 programming language of the world.

Symbol of Java Programming Language

Following are the most important feature which have made Java so popular in the software world.

1-Platform Independent 

Before we can understand the meaning of the platform independent we must first understand the meaning of the world platform.
In the software world, the world platform in the environment in which a program runs. In simple words it is the combination of operating System and CPU.
So windows + core i7 is one platform while Linux + AMD(Advance Microdevices) Athlon is another platform.

Now being platform Independent means that a program compiled on one platform can be executed on any other platform without rewriting OR recompiling and java has this ability with the help of byte code and JVM.

Whenever we compile a Java program, the java compiler never generates Machine code. Rather the java compiler converts our program into an intermediate code called as the Byte code. This Byte code is not directly understandable to the machine(OS and CPU), so a special software is require which converts this byte code into machine understandable format and this software is called as JVM(Java Virtual Machine).

Thus wherever a JVM is present, there we can execute a Java Byte code without rewriting OR recompiling.
This makes Java platform independent and truly justifies its punch line(WORA- Write Once Run Anywhere).




2-Automatic Memory Management

Java is a very good Automatic Memory management. In other words it means that a java developer OR programmers only has to worry about memory allocation while the deallocation of memory is totally handed by JVM. Due to this no memory leaks occur in Java and programmer can better concentrate on the main logic of his program.

3-Secure

Java is one of the most secured programming languages present in the world today and there are the main reason due to which java is consider to be most secured language.
  1. Java does not support pointers i.e.., a java programmer is not allowed to display address of any variable in its program.
  2. Java program is not allowed to interact OR communicate directly. With the operating system. Rather this communication goes through JVM and so a java application behaves in a secured way compare to C and C++ applications(Program).

4- Robust(Fault Tolerant)

Java has some strict rules which every programmer must follow and if these rules are broken then Java generates EXCEPTION(Run time error) and kill the program.
For Example :
In Java we're not allowed to access an array beyond its boundary and if we try to do this then Java will terminate our program by generating EXCEPTION. Due to this the other program running in the memory and the OS itself remain safe and secure. Thus we can say Java is robust language.

5- Simple

Java has inherited its 80% syntax from languages like C and C++.
For Example - 
Topic like Datatype, Operators, Arrays, If Else Loop etc.. are also present in the java with almost some syntax as C and C++ languages. So, if a programmer is familiar with these language. He can easily learn Java. This Java is simple language considered to other programming language.

6- Object-Oriented

Java strongly concept of object oriented programming. For Example in java is compulsory to use class in every program which we write similarly topic like polymorphism, inheritance, Abstraction, encapsulation etc.. are strongly supported by java so we can say that unlike C, Java supports object oriented programming rather then  procedure object oriented programming.

7- Multi-threading

Multithreading means parallel execution. In other words we can say that if a program can run multiple function together it means that it is using multithreading.
For Example - Consider a music player then many other activities take place parallelly like:
  1. We're allowed to set volume level.
  2. We can add or Remove song from the playlist.
  3. We can see the time elapse with the help of the time.
  4. We can forward OR backward the song using the slider.

All the above activities work together and this is called Multi-threading. Java has very good support for the Multi-threading application to chatting software, games, media player etc.. can be easily develop in Java.

Comments

Popular posts from this blog

Day2 : Compiling Java Program with Examples

What does System.out.printf( "%-15s%03d\n", s1, x) do?