Java statische Top-Ebene-Klasse
static class Animal {
public static void displayInfo() {
System.out.println("I am an animal");
}
}
class Main {
public static void main(String[] args) {
Animal.displayInfo();
}
}
SAMER SAEID