jeudi 14 janvier 2021

Instantiating an object if the corresponding class exists in Java [duplicate]

Class.forName("MyClass") returns the Class MyClass if it was defined in the default package.

How can we create an Instance of this class? How would we specify the Type?

Aucun commentaire:

Enregistrer un commentaire