I'm a High school student, I studied a little bit of Java by myself. My teacher asked if you can write two methods with switched but same parameters. For example:
public void method (String arg1, int arg2){
}
public void method(int arg1, String arg2){
}
I said yes, the teacher said that I don't know what overloading means, but I tested and it worked, and then she said "JDK has a bug" and she got mad at me.
I need a super and complete answer.