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

Related questions

0 votes
asked Feb 9, 2021 in JAVA by SakshiSharma
+1 vote
asked May 31, 2020 in JAVA by SakshiSharma
...