I do know that in java static methods can only use static variables and static methods and but non static methods can use non static variables and methods. is there any explanation why static methods can only access static variables/methods? and cannot access non static methods and variables?
to access non-static methods/fields, you require an instance of the class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With