Showing posts with label Method Signature. Show all posts
Showing posts with label Method Signature. Show all posts

Java- Method Signature / Chapter -5 / OOP's Concept



   Java- Method SignatureJava Method Signature



    1. In Java method signature consists of, methods names followed by arguments types.

Method Signature Syntax

     2. Return Type is not part of the method signature in java.
     3.The compiler will use method signature to resolve method calls.

example:-

Java- Method Signature / Chapter -5 / OOP's Concept

1. In Java method signature consists of, methods names followed by arguments types.


     2. Return Type is not part of method signature in java.
    3.Compiler will use method signature to resolve method calls.

example:-
class Test
{
        public void m1(int i)
       {
             System.out.println(int  type arguments");
         }   
        public void m1(String s)
       {
             System.out.println(String type  arguments");
         }   
        public static void main(String [ ] args )
        {
               Test   t    =new  Test( );
               t.m1(10);
               t.m1("javabychetan");
        }
}

Output

Flipkart End Of Season Sale






© Copyright 2017 Javabychetan.blogspot.com