Explain me please, why, when I write 4 overloaded methods and call it => it chooses method with 'int' as default, but not 'byte', which is closer/better, because it can storage values from -127 to 128?
class Main {
public static void method(short s) {
System.out.println("short");
}
public static void method(byte b) {
System.out.println("byte");
}
public static void method(int i) {
System.out.println("int");
}
public static void method(long l) {
System.out.println("long");
}
public static void main(String[] args) {
// put your code here
method(10);
}
}