Example & Tutorial understanding programming in easy ways.

Can we override the static method?

The answer is Yes. We can have two ore more static methods with same name, but differences in input parameters.

For example, consider the following Java program.


public class javatest {

public static void fun() {

System.out.println("javatest.fun() called ");


public static void fun(int a) {

System.out.println("javatest.fun(int) called ");


public static void main(String args[])






output :-javatest.fun() called

javatest.fun(int) called


Read More →
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!