Computer Science, asked by rupeshdalal6458, 11 months ago

How you can create an object of a class in java?

Answers

Answered by pratyasha9187
1
There are four different ways to create objects in java:
A. Using new keyword. This is the most common way to create an object in java. ...
B. Using Class.forName() If we know the name of the class & if it has a public default constructor we can create an object in this way.
C. Using clone() ...
D. Using object deserialization.


Hope it helps plz mark as brainliest and follow me, hurry up don't forget to mark as brainliest


I am always there to help you
Similar questions