Which Overloaded Method is Called in Java

后端 未结 5 566
一向
一向 2021-01-30 12:56

I have a basic inheritance situation with an overloaded method in the super class.

public class Person {
    private String name;
    private int dob;
    priva         


        
5条回答
  •  迷失自我
    2021-01-30 13:11

    getWorkDetail(this) does not know what the subclasses are. call getWorkDetail instead.

提交回复
热议问题