-
What does Class.forName(“myreflection.Foo”).getInstance() return?
-
- Foo object
- Calls the getInstance() method of Foo class
- class object of Foo
- An array of Foo objects
- None of these
Correct Option: A
Class.forName(“myreflection.Foo”) returns the class object of Foo and getInstance() would return a new object.