steps to create an object of a class in java
Answers
Answered by
0
Using New Instance : If we know the name of the class & if it has a public default constructor we can create an object –Class.forName. We can use it to create the Object of a Class. Class.forName actually loads the Class in Java but doesn't create any Object.
EX: hi man= new hi();
Similar questions