how to accept all type in java
public void myFunc(int i)
{
System.out.println(i);
}
public void myFunc(double d)
{
System.out.println(d);
}
public void myFunc(String s)
{
System.out.println(s);
}
public void myFunc(boolean b)
{
System.out.println(b);
}