I am trying to understand the following code:
public class A {
private void doTask() {
doInt(99);
}
public short doInt(short s) {
return 100;
}
}
The code gives a compiler error on line "doInt(99)".
The method doInt(short) in the type A is not applicable for the arguments (int)
Can someone explain why it's giving me the error.