What is the difference between instantiating a class in the member variable AND inside a constructor?

后端 未结 0 1357
醉酒成梦
醉酒成梦 2021-02-05 15:33

What is the difference between

public class Person {
    private Animal animal;
    public Person() {
        this.animal         


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