Is it possible to create an instance of an object in Java without calling the constructor?

前端 未结 4 1379
旧巷少年郎
旧巷少年郎 2020-11-30 06:54

I\'m trying to fix a bug in one of my programs which I think might be due to Hibernate figuring out how to instantiate an instance of an object without calling its default (

4条回答
  •  猫巷女王i
    2020-11-30 07:31

    Just to complete the picture: using method clone to create a new object bypasses constructors as well.

提交回复
热议问题