Java Programing – An Introduction to Java

How Java came into the mainstream

           The early 1950 languages such as Fortran and Cobol are Specific purpose languages. The main drawback of specific purpose languages is they are specific to a particular purpose. For example, Fortran is meant for developing only scientific applications, and Cobol is meant for developing only business-oriented applications.

           In the early 1960s, the BCPL (Basic Combined Programming Language) language was developed for developing all types of applications i.e., BCPL is a general purpose language.

           The drawbacks of BCPL are solved with a new language called ‘B’. Even though ‘B’ is a general-purpose language, it has its own drawbacks. To solve these problems, a powerful, efficient, reliable language “C” was developed by Dennis Ritchie in 1972.
The ‘C’ language follows Structured Programming approach. The main drawback with Structured Programming languages such as ‘C’ is its complexity increases once
the project size reaches a certain size.

           To solve this problem, a new way to program was invented called Object Oriented Programming (OOP). OOP programming methods help us to organize (simplify) complex programs through Encapsulation, Inheritance, and Polymorphism. C++ was developed by Stroustrup in 1979. Two main drawbacks with C++ language are: Platform dependent and won’t support Internet and WWW.

           To solve these problems, James Gosling developed a new language called JAVA at sun Microsystems in 1991, which is platform independent and supports WWW & Internet. Java was initially called as “OAK” after he saw oak tree outside of his window at the sun. Later he came to know that the Language “OAK” already existed in the market. When a group of sun people visited a local coffee shop, the name “JAVA” was suggested.

Java can be described as:
1. Simple
2. Object Oriented
3. Robust
4. Platform Independent
5. Portable
6. Multi-threaded (Or-Parallel Execution)
7. Distributed (Or Networking)
8. Secure
9. Dynamic

I. Simple
Java is a simple language because of the following reasons:

  • Java is syntactically related to C++ which is a direct decedent from C (i.e., C++ is evolved from C).
  • Most of the syntax and characters are inherited from these two languages.
    Some of the most confusing concepts in C/C++ are either left out of java or implemented in a cleaner way.
  • For example, Pointers are completely eliminated from java. The disadvantage with pointers are the overriding memory and corrupting data. In Java, the memory management is implemented in a cleaner way using Garbage Collector (GC)

II. Object Oriented

  • Java language follows Object Oriented Programming (OOP) paradigm.
  • The OOP principles are Encapsulation, Inheritance, and Polymorphism.
  • Every Program in java is an Object Oriented Program. Java is a fully object-oriented language but not the pure object-oriented language because of the existence of primitive data types. Small talk is a pure object-oriented language. Literally, everything in small talk is an object.

III. Robust (Means Reliable)

  • Java is intended for writing reliable programs. Java provides an Exception Handling mechanism which puts lots of emphasis on early checking for possible errors and dynamic checking.
  • Java automatically handles Memory Management using Garbage collection.
  • Java eliminates pointers.

IV. Platform Independent

  • Write once, Run on any platform, Any time, Forever. Java is a platform independent language because of the bytecode.
  • The compiled bytecode is common across all operating systems (platforms).
  • The Java source files are compiled to a bytecode, whereas C/C++ source files are directly compiled
    to a native code.

V. Portable

  • The size of the primitive data types is fixed on all platforms.
  • Also, binary data is stored in a fixed format, eliminating the “big endian | Little Endian” confusion.

VI. Parallel Execution

  • Reduces the execution time and improves execution speed.

VII. Networking (Or Distributed)
Java has become one of the most popular languages for N/W programming due to two salient features:

  • Platform independent
  • Multithreading.

VIII. Secure

  • Java provides several layers of protection from dangerous code, virus, Trojan horses.
  • Java security is provided from the Java Architecture itself. Also, Java security can be provided using a security API.

IX. Dynamic

  • It was designed to adapt to an evolving environment.
Catch us on social media

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

RSS
Facebook
Google+
https://betechnical.blog/2018/07/09/java-programing-an-introduction-to-java">
Twitter
YouTube
Pinterest
Pinterest
LinkedIn
Instagram
%d bloggers like this: