Introduction To Java

History of java

Java is an object-oriented language that was developed as a project by James Gosling and his team, Sun Microsystems, in the year 1991. It was initially designed as a problem-solving platform  which was later accepted worldwide due to it’s high efficiency. What is a platform you may wonder?. It is basically an environment where a software is implemented.

This project was initially named oak. But due to patent issues it was dropped and replace by JAVA which is a breed of coffee. Hence we can see a steaming cup of coffee in it’s logo.

It is now under the ownership of Oracle.

Salient Features / Advantages of Java

Features of Java

  •  JDK consists of compiler and JRE . Whenever  a java program is compiled, a dot class file (.class)  will be created which is also known as byte code which will be allocated to the jvm to be executed.
  • Now we know that JVM is platform dependent that is it accesses the operating system. Since each OS has it’s own JVM, So whatever the OS might be, output is the same.
  • Thus we can say it can run in any environment, i.e, it is Platform Independent.
shield

  • Java codes are converted into byte codes which are implemented on JVM.
  • It also performs the tasks of a security manager which kept updated via internet. It is responsible to throw exceptions.
  • For example it raises an OutofBoundary exception in the case of arrays when the user tries to access the index higher than allocated memory.
  • It is also strongly typed language.

  • One of the factors for the widespread popularity of Java is because it is an OOP language.
  • We can say that Java is nearly 100% object oriented language. For a language to be completely object oriented, even it’s primitives will have to be object, which is not the case here.
  • We have four OOPs concepts:
    • Abstraction
    • Encapsulation
    • Inheritance
    • Polymorphism

  • Early identification and checking for errors can be achieved by the help of garbage collector and exception handler.
  • Also a variable cannot be declared without having a data type. All the data types are pre defined as a part of programming language.
  • The advantage of being a strongly typed language is that it imposes a set of stringent set of rules on the user which guarantees consistency of the output

  • It can be easily implemented, since,  no concept of pointers explicit memory allocation as well as structures or operator overloading is used here.

  • We can write Java program in one environment and implement it on another environment. It can be easily moved among various OS ( Windows, Linux, Mac ) to yield the same output.

  • A thread  can be defined as a light weight process recognized as smallest unit of processing.

  • Concurrent execution of different parts/threads of a prog.at the same time.for maximum utlisation of the CPU. 

  • Management of allocation and de allocation of the objects in java is done by either assigning them to heap or stack for easy access and easily restoring the data.

Disadvantages of Java

 

  • It is memory consuming and of significantly low performance.
  • Slow performance due to extra level of compilation and abstraction of JVM and more memory consuming due to the functioning of garbage collector.
  • No backup facility. It is much focused on storing the data than backing up the data.

  •  In java the codes are generally complex in comparison to other languages.
  • Java has succeeded to become a manageable language but compromised the ease of understanding for the user.