Saturday, 2 March 2013

Java Introduction

Before we proceed to learn JAVA in greater depth lets take a look at some very basic questions like what is java and what are it's features that has made it so popular.

What is java?

     Java is a programming language and computing platform first released by Sun Microsystems in 1995.Just for the record Java runs on more than 850 million personal computers worldwide, and on billions of devices worldwide, including mobile and TV devices.

 Why do I need Java?

     There are lots of applications and websites that won't work unless you have Java installed, and more are created every day. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere! Java is free to download. You can download it from here.

What will I get when I download Java software?

      The Java Runtime Environment (JRE) is what you get when you download Java software. The JRE consists of the Java Virtual Machine (JVM), Java platform core classes, and supporting Java platform libraries. The JRE is the runtime portion of Java software, which is all you need to run it in your Web browser.This is just to get things going but we will come to actually setting up java in later part of these tutorials.

Why Java over other programming languages?

     There are various reasons why one would prefer Java over other programming languages but it is my opinion that choosing a programming language should depend on what are you developing using this language and what are the features(Frameworks or Libraries to be more specific) specific to your project that the programming language supports.
     Lets now see why we have chosen Java as a programming language.
  • Object oriented - Java is an Object oriented programming(OOP) language which gives it an edge over other languages like C. OOP has many important features like Inheritance, Polymorphism, Data Encapsulation etc. We will look into these as we proceed but lets just keep these in mind.
  • Simple grammar -  java has a very simple grammar familiar to programmers having some exposure to C or C++.
  • Platform Independence - Java is compiled into bytecode which can be run on any machine. This makes java programs hardware independent. Also it is independent of any OS(Operating System) you use. All you need is a JVM (Java virtual machine) - this is installed when you install JRE mentioned above. JVM sits over your OS and runs all java programs.
  • Speed - The latest JIT compilers for Suns JVM approach the speed of C/C++ code, and in some memory allocation intensive circumstances, exceed it. (Too bad Ruby, Python, Perl, and Squeak don't even come close).
  • Safe - Java has always given preference to safety. After all it was developed for web. Java from it's earliest version provide support to catch exceptions and handle errors.
  • Garbage collection - If you have previously worked with C++ you may know that you explicitly need to define destructors to release memory taken by the objects on the heap.In Java this process is automated and there is no concept of destructors. JVM automatically invoked garbage collector to do this.This itself is a topic and will be dealt later in detail.
  • and many more...... You will get to know other benefits of using Java as we proceed in these tutorials.


t> UA-39527780-1 back to top