first, your Singleton1 class doesn't have a getName() method, so you must declare it first before invoking it from the main().
Second, constructor Singleton() is private, therefore you cannot use Class.newInstance() method because it works only for public default constructor.
Third, method getName() is private, so you cannot use class.getMethod(name,...) method because it works only for public methods.
See javadoc for details.
Try this code:
Joined: Apr 08, 2003
Thanks i can now able to call the singleton class. I think its high time for me to tune up my reflection knowledge. Thanks again.