How to call static methods a class from a method in the same Java class

public class CallingMethodsInSameClass
{
public static void main(String[] args) {
printOne();
printTwo();
}

public static void printOne() {
System.out.println("Hello World");
}

public static void printTwo() {
printOne();
}
}

Comments

Popular posts from this blog