public class ssvprg
{
public static void action(int value)
{
System.out.println("Int = " + Integer.toString(value));
}
public static void action(String value)
{
System.out.println("Length = " + value.length());
}
public static void main(String[] args)
{
// Call with Integer argument.
action(1);
// Call with String argument.
action("cat");
}Java
Java - Method Concept.

Written by
View ProfileSenthilvelan Sambamoorthy
Senthilvelan Sambamoorthy is working as a Professor in Department of Master of Computer Applications, Paavai Engineering College, Namakkal, Tamilnadu, India, He is Masters in Computers Applications. Having 18+ years of experience and his area of interest is Java, JSP, Servlet, J2EE, C#, PHP, Python ASP.NET, SQL Server and etc.
