How you can create an object of a class in java?
Answers
Answered by
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
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
Science,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
Biology,
1 year ago
Math,
1 year ago