Why can we call a non static method of a class inside a static method of different class if there is inheritance between the two?

前端 未结 0 1301
不思量自难忘°
不思量自难忘° 2020-12-02 12:31
class B{
    
    public void fun(){
        System.out.println(" i am in class B");
    }
}

public class A extends B{
    
    public static void main(St         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题