Syvum Home Page

Home > Discussions > For all activities

Discussion topic: Contributed Answer/Explanation to Q. 13

Viewing replies        View entire discussion

To go to the homepage of this topic, click here.
Home: alokrajivOriginal MessageReply  
Subject: Contributed Answer/Explanation to Q. 14
   Answer :
   
   Multiple funxtions with the sam identifier names with
   
   
	   number of parameters 
	   datatypes of parameters
	   order of parameters of varying datatype
   
   
    Example :
   
   
    
   
   
   class puki
   {
       public static void main(String[] args)
       {
           call();
           call(1);
           call(1,2);
           call(1,'a');
       }
       public static void call()
       {
           System.out.println("Hello Java");
       }
       public static void call(int n)
       {
           System.out.println(n);
       }
       public static void call(int a,int b)
       {
           System.out.println(a+" "+b);
       }
       public static void call(int x,char ch)
       {
           System.out.println(x+" "+ch);
       }
   }

Posted at: Thu Mar 25 16:47:19 2010 (GMT)

Page 1 of 1
From: alokrajivReply 1 of 2Reply
Subject: Contributed Answer/Explanation to Q. 14
   Answer :
   
   Multiple funxtions with the same identifier names with
   
   
	   number of parameters 
	   datatypes of parameters
	   order of parameters of varying datatype
   
   
   Example :
   
   
    
   
   
   class puki
   {
   public static void main(String[] args)
   {
   call();
   call(1);
   call(1,2);
   call(1,'a');
   }
   public static void call()
   {
   System.out.println("Hello Java");
   }
   public static void call(int n)
   {
   System.out.println(n);
   }
   public static void call(int a,int b)
   {
   System.out.println(a+" "+b);
   }
   public static void call(int x,char ch)
   {
   System.out.println(x+" "+ch);
   }
   }

Posted at: Thu Mar 25 16:47:38 2010 (GMT)

From: alokrajivReply 2 of 2Reply
Subject: Contributed Answer/Explanation to Q. 14
   Answer :
   
   Multiple funxtions with the same identifier names with
   
   
	   number of parameters 
	   datatypes of parameters
	   order of parameters of varying datatype
   
   
   Example :
   
   
    
   
   
   class sample
   {
   public static void main(String[] args)
   {
   call();
   call(1);
   call(1,2);
   call(1,'a');
   }
   public static void call()
   {
   System.out.println("Hello Java");
   }
   public static void call(int n)
   {
   System.out.println(n);
   }
   public static void call(int a,int b)
   {
   System.out.println(a+" "+b);
   }
   public static void call(int x,char ch)
   {
   System.out.println(x+" "+ch);
   }
   }

Posted at: Thu Mar 25 16:48:08 2010 (GMT)

Page 1 of 1

To post to this forum, you must be signed in as a Syvum member. Please sign in / register as a member.

Contact Info © 1999-2024 Syvum Technologies Inc. Privacy Policy Disclaimer and Copyright