Method Overloading in Java

Here is sample code for Method Overloading.

class meover
void san(int a)
System.out.println(“The Number is ” +a);
void san(String a)
System.out.println(“The String value is ” +a);
void san(char a)
System.out.println(“The Character is ” +a);
public static void main(String ar[])
meover me=new meover();

The Number is 7
The String value is Nice
The Character is S

Share your queries and comments.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s