Can I create object without constructor?

Actually, yes, it is possible to bypass the constructor when you instantiate an object, if you use objenesis to instantiate the object for you . It does bytecode manipulations to achieve this. Deserializing an object will also bypass the constructor.

Sizin İçin Seçtik  Can we have a class with no constructor in it in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *