1.

Can We Call A Non-static Method From Inside A Static Method?

Answer»

Non-Static methods are owned by objects of a CLASS and have object level scope and in order to call the non-Static methods from a static block (LIKE from a static main method), an object of the class NEEDS to be created FIRST. Then using object reference, these methods can be invoked.

 

Non-Static methods are owned by objects of a class and have object level scope and in order to call the non-Static methods from a static block (like from a static main method), an object of the class needs to be created first. Then using object reference, these methods can be invoked.

 



Discussion

No Comment Found