Thursday, September 13, 2012

Java

JAVA REFERENCES

In informatin technology(IT) we have two model of language they are:

1.)Procedure Oriented programming language.2.)Object Oriented Programming language.

If we represent the data with procedure oriented programming language then the data can be accessed by any unauthorized/programs.

For example,the result of one 'C' program can be accessed by another 'C' program with out getting any permissions in the busy environment like client-server environment.This approch leads to lack of security.

According to industry experts opinion, procedure oriented programming language never provides effective security.Hence these types of language are not used in the industry for development of distributed application.But these language are recommended to develope application related to the system soft ware.

Ex:c,pascal,etc.................

OOP'S principles are divided into 8 types.They are:

1.)Classes
2.)Objects
3.)Data Abstraction.
4.)Data Encapsulation
5.)Inheritance.
6.)polymorphism.
7.)Dynamic Binding.
8.)Message Passing.

All the above principles are common for all object oriented programming lang. vendors but whose implemantation/syntax are varing from one object oriented programming language to other OOP Lang.

1,)Classes:
-----------

  • The purpose of classes concept is to develope user defined/programmer defined data types.
  • With out classes concept their is no java program i.e., each and every java program starts with a concept called classes.
  • In order to use classes concept for developing user defined data type, we use a key word called "class".

Definition:

                  A class is a collection of data members and methods .
                                       (or)
                  The process of binding data members and associated methods in a single unit is called "class".

    • when ever we define a class there is no memory space for the data members of the class.But memory space will be created for the data members of the class when we created the object.
    • Data members of a class are also known as fields/attributes/properties.
    • Methods of a class are also known as Behaviors/Accessories/functions.

In oop's we have two types of methods.They are:

1.)Member methods.
2.)Non-Member methods.


  • A member method is one which is defined with in the scope of the class and it can access the data members of the class.
  • A Non-member method is one which is not available with in the scope of the class and it can't access the data member of the class.
Each and every method of java must be defined inside the class only.i.e.,