Welcome to manohar academy.
In this lesson we are going to learn about java static methods. They are also referred to as class methods.
Limitations of static methods:
A static method can access only static variables
A static method can only call other static methods.
It can not access instance variables or instance methods.
Advantages of Static methods:
we can have library of methods which can be called on class.
We can have factory methods and companion classes using static methods.
Static methods can be used:
when we need access to only static variables
when required values are passed through input arguments.
visit my website : http://manoharacademy.com
java fundamentals : https://goo.gl/iN5oLb
java arrays : https://goo.gl/v2LUpf
java class design : https://goo.gl/IQbfRk
java inheritance : https://goo.gl/l1wDOO