yes we can like this
public class dd {
public static void main(String[] args) {
dd d = new dd();
String[] arr = new String[2];
d.main(arr, "s");
}
public static void main(String[] args,String s) {
// TODO Auto-generated method stub
System.out.println("hi");
}
}
Yes but only the main(String[] args) version will be called when you try to run the class as a program.
Or did you mean override? i.e. put a main() method in a class derived from a class which already has one? If so the answer is again yes but if you execute the base class it is the base class's main() method which will be executed (because static methods aren't despatched dynamically like non-static methods).