Write the definition of a class Telephone . The class has no constructors and one static method printNumber . The method accepts a String argument and prints it on the screen. The method returns nothing.
I tried and failed at:
public class Telephone
{
private static String phrase;
public static void printNumber(String str)
{
phrase = str;
System.out.println(phrase);
}
}
Please help