Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Method

Advertisement
In this section, we will explore the concept of method in the reference of object oriented programming techniques.

Method

     

In this section, we will explore the concept of method in the reference of object oriented programming techniques.
As we earlier described in the topic class, a class have two major parts state and behavior. States are represented by variables and behaviors are defined by methods.

  1. Method : An brief introduction
    Methods perform the most important work in a class, object can't do anything without method. Some programming languages use reflexive data structures to do the same action, they have a complete set of data, but they don't have any behavior and due to this they depend on other functions.

       
  2. Method Invocation  
    After taking a brief look on methods, now the next question arises that, "what is method invocation?". There are two type of method in java object-oriented technique first one is the Instance method and the other one is the class method.
       
  3. Method Overloading  
    As we know that a method have its own signature which is known by method's name and the parameter types. Java has a powerful feature which is known as method overloading. With the help of this feature we can define two methods of same name with different parameters.
        
  4. Method Overriding  
    Overriding is another useful feature of object-oriented programming technique. It provide the facility to redefine the inherit method of the super class by a subclass. The method overriding is used to invoking the parent class method by a child class.
        
  5. Scope 
    A method's visibility is known as method scope. We can say that it defines whether a object can invoke as well as any subclass can override the method or not.
Advertisement

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: June 17, 2009

Ask Questions?    Discuss: Method  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com