0 votes
in JAVA by
How many ways to create object in java?

1 Answer

0 votes
by

How many ways to create object in java?

There are five different ways to create an object in Java:

Java new Operator

Java Class. newInstance() method

Java newInstance() method of constructor

Java Object. clone() method

Java Object Serialization and Deserialization

🔗Source: stackoverflow.com

🔗Source: Java Interview Questions and Answers

...