Answers for "overwrite static method java"

0

can we overload a static method in java

package test.main;
 
public class TestOverload {
 
	public static void main(String args[]) {
 
		TestOverload.show();
		TestOverload.show("FrugalisMinds");
	}
 
	public static void show() {
		System.out.println("Show Called ");
	}
 
	public   void show(String name) {
		System.out.println("Overloaded Show Called" + name);
	}
}
Posted by: Guest on June-19-2020
0

can you override static methods in java

no, this is why you cannot use static methods in interfaces.
Posted by: Guest on September-13-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language