Monday, 30 June 2014

INTRODUCTION TO JAVA


DEFINATION
  
        " Java is an object-oriented language."  
                  
                     This particular statement is not false but it is also not correct. The complete statement would be

          "Java is a true object-oriented language."
  
                     Why did I add this word 'true' to its defination ?

           An OO language  can be either partial , true or pure . It is classified into these on the basis of usage of OO features -

       1) Partial - May or may not use OO feature in the program . Ex : C++
       2) True - The program must contain some OO features . Ex: Java
       3) Pure - Each and every instruction of the program must use some OO feature. Ex: SmallTalk

-----------------------------------------------------------------------------------------------------------------------------------------

HISTORY 
         
        Java was developed by James Gosling and his team of Sun Microsystems of USA in 1991. It was originally called Oak , but due to some legal snags it was renamed as Java . Its just a name and not a acronym.

Principles: 

There were five primary goals in the creation of the Java language 

1.    It should be "simple, object-oriented and familiar"
2.    It should be "robust and secure"
3.    It should be "architecture-neutral and portable"
4.    It should execute with "high performance"
5.    It should be "interpreted, threaded, and dynamic"

Major release versions of Java, along with their release dates:
·         JDK 1.0 (January 21, 1996)                                                                          James Gosling
·         JDK 1.1 (February 19, 1997)
·         J2SE 1.2 (December 8, 1998)                                                                     
·         J2SE 1.3 (May 8, 2000)                                                                              
·         J2SE 1.4 (February 6, 2002)
·         J2SE 5.0 (September 30, 2004)
·         Java SE 6 (December 11, 2006)
·         Java SE 7 (July 28, 2011)
·         Java SE 8 (March 18, 2014)


----------------------------------------------------------------------------------------------------------------------------------

MAIN FEATURES OF JAVA

1. Compiled and Interpreted

 Java has a two stage system. 
(i).Java compiler translates source code into bytecode instruction.

(ii).Bytecodes are not machine instructions and hence not executable. Therefore, in the second stage Java interpreter generates machine code that can be directly executed.

2.Platform Independent and Portable

Java programs are easily portable. Changes in the operating systems, processors and system resources do not force any changes in the Java programs.This is the reason why java has become a popular language for programming on internet .

    Portability is ensured in two ways :
    (i). Java compiler generates bytecode instructions that can be implemented on any machine.

    (ii).The size of the primitive data types are machine-independent.

3.True OO language

4.Robust and Secure
   
  (i).It ensure reliable code in many ways.It has strict compile time and run time checking for the data types.

  (ii).It also has automatic garbage collection thus relieving the programmers.   

  (iii).It also incorporates the concept of exception handling which captures errors and eliminates risk of            crashing the system.

  (iv).Absence of pointers in java ensures that programs cannot gain access to memory locations without          proper authorization.

Java has many other features - simple,small& familiar 
                                            - mutithreaded & interactive                      
                                            - dynamic & extensible code
                                            - distributed
-----------------------------------------------------------------------------------------------------------------------------------------
  

                                                                                                                                          read more >>

1 comment: