GetInstance()

Why getInstance() is written after Class.forName( )?

Questions by sanjeeb_1068

Showing Answers 1 - 3 of 3 Answers

getInstance() means we are creating object for loading of the class, thats why we are using getInstance() after loading of the class.
ex:
  Class c=Class.forName("addition");
   c.getInstance();//it creates the object of addition class

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions