How did bird able to call the method fly if it's private
public class Bird {
private static void fly() {
System.out.println("Bird is flying");
}
public static void main(String[] args) {
fly(); // make sense
Bird bird = new Bird();
bird.fly();
}
}