is there any way to access Non-Static variables/methods from a static methd Regards, aakash
posted 12 years ago
Create an object of the class and get them thru the instance. You have to remember that the reason you can't access instance variables and methods from a static context is that static methods are not polymorphic which means that the compiler links the method at compile time, not runtime like. So the compiler has no way of knowing what instance (if any) to use.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher