/** * An overloading example
* Write a method numberOfCharacters that counts how many characters are
* needed to print its argument.
* The method should work with an int, a long, and a String.
*/
public class OverloadingExample {
/**
* postcondition:
* result == number of characters to print a long
* @param n the long to print
*/
public int countCharactersToPrint(long n)
{
}
/**
* postcondition:
* result == number of characters to print an integer
* @param n the integer to print
*/
public int countCharactersToPrint(int n)
{
}
/**
* postcondition:
* result == number of characters to print a String
* @param s the String to print
*/
public int countCharactersToPrint(String s)
{
}
}