Access private field of a instance object

后端 未结 5 1061
孤城傲影
孤城傲影 2021-01-13 22:38

I have a class, which has one field named orbits (it has the same type as my class Body and has the private modifier):



        
5条回答
  •  醉酒成梦
    2021-01-13 22:48

    Because victim is an instance of Body, it can access any field of a Body isntance.

提交回复
热议问题