Can we instantiate an abstract class?

后端 未结 16 1478
长情又很酷
长情又很酷 2020-11-22 07:43

During one of my interview, I was asked \"If we can instantiate an abstract class?\"

My reply was \"No. we can\'t\". But, interviewer told me \"Wrong, we can.\"

16条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 08:22

    The technical part has been well-covered in the other answers, and it mainly ends in:
    "He is wrong, he doesn't know stuff, ask him to join SO and get it all cleared :)"

    I would like to address the fact(which has been mentioned in other answers) that this might be a stress-question and is an important tool for many interviewers to know more about you and how do you react to difficult and unusual situations. By giving you incorrect codes, he probably wanted to see if you argued back. To know whether you have the confidence to stand up against your seniors in situations similar to this.

    P.S: I don't know why but I have a feeling that the interviewer has read this post.

提交回复
热议问题