How can we overload or override static methods in java?
Vishalini.R Answered question May 29, 2023
Static methods cannot be overridden because they are associated with the class itself rather than individual instances of the class but it is possible to overload static methods. The method overloading refers to defining multiple methods in the same class with the same name but different parameters. The compiler determines which version of the method to call based on the arguments passed during the method invocation.
Riya Answered question May 29, 2023
