Introduction to Java

Introduction to Java

Java is a general purpose programming language, it is multi-threaded, class-based, object-oriented and strongly-typed. It was intended to be written once and run anywhere, Sun Microsystems’ motto was “Write Once, Run Anywhere” because once compiled into bytecode, runs on all platforms that support the JVM (Java Virtual Machine) without any need to be recompiled using the native Operating System’s compilers as was the case for other languages such as C and C++.

What’s Covered

  1. History of Java
  2. Java Official Release
  3. Java Features and Language Properties
  4. Java is a Object Oriented Language
  5. Java is a Strongly-Typed Language
  6. Java is Robust
  7. Java is Platform Independent
  8. Java is Compiled and Interpreted
  9. Java has Memory Management
  10. Java is Multi-threaded

History of Java

The history of Java actually began with a different name and much different purpose in mind. James Gosling, Patrick Naughton and a team of developers were working on a TV set top box project at Sun Microsystems using C++ had become increasingly frustrated with it.

Gosling decided come up with a language that addressed some of the frustrations and perceived short-comings of C++ that could be used in this project. Originally called OAK after an oak tree that was outisde of Gosling’s office. Its name was later changed to Green and was finally renamed to Java.

Ultimately the TV set-top box flopped, but they now had a language that could be used for the next big thing that was beginning to take off: the Internet.

Java Official Release

Java 1.0 was released to the public in 1995. It was quite primitive compared with today’s versions of Java and languages like C and C++. BUt it did support applets which could be embedded into Web pages and run on the most popular browser at the time, Netscape Navigator written by Marc Andreesen.
It was the first programming language that allowed web pages to be truly interactive and as such drew such a fan following that hundreds of thousands of programmers flocked to learn Java in a first few months of the language’s release.

Although Java could run inside browsers as applets, it became increasingly popular outside of browsers.

Java Features and Language Properties

  • Java is a Object Oriented Language

    Java is comprised of objects, classes, inheritance, interfaces, and packages. Java objects are used to model “real” or “physical” world objects based on certain characteristics you would like to take into account and are created by using templates called classes.

  • Java is a Strongly-Typed Language

    In Java, every variable must be declared and associated with a specific type. A variable may not be declared without knowing the values that it may contain. Additionally, once a variable is declared you are not allowed to change it.

  • Java is Robust

    Java put a lot of emphasis on ensuring that errors and bugs are caught as early as possible. Java’s compiler is able to detect many problems early to ensure that they are corrected prior to execution. In addition to its vast compile time checking and runtime checking, it provides powerful exception handling, and strong type checking to prevent hard to catch bugs as compared to other languages. Java also performs automatic memory management and garbage collection to ensure that memory that is no longer used can b reclaimed. All of these features makes the language robust.

  • Java is Platform Independent

    Platform independence is the ability of a program to run in different computing environments without the need to be recompiled in that environment. Java is compiled into Bytecode that can run on any computing device that contains a Java Virtual Machine (JVM).

  • Java is Compiled and Interpreted

    Java is compiled into bytecode which can run on any machine that has a Java Virtual Machine (JVM). These bytecodes are interpreted by the JVM when the program is running. However, JVM’s may use JIT (Just-In-Time) compilers to perform optimizations like inlining functions that are commonly used or convert some of this bytecode into native instruction set to improve system performance.

  • Java has Memory Management

    Java Memory Management and built in garbage collection is one of the languages hallmark features. It gives the developers the freedom to create objects without having to worry about allocating and deallocating space as the garbage collector takes care of reclaiming memory from unused or out-of-scope variables.

  • Java is Multi-threaded

    Java allows us to create applications that are multi-threaded. The Java Virtual Machine support multiple threads running concurrently within the same process. Programs that run more than one task at any time are said to be multithreaded. Multithreading allows multiple threads to exist and execute simultaneously within the context of a single process. It will allow for multiple tasks to execute on multiprocessor systems. This, in turn makes better utilization of CPU resources and makes programs appear much more responsive.

intro_to_java

Core Java Related Tutorials

Please Share Us on Social Media

Facebooktwitterredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *