public class Tes {
void setColor(byte i) { System.out.println("" + i);}
public static void main(
String args[]) {
Tes a = new Tes();
byte b = 30;
a.setColor(b);
a.setColor(30);
}
}
Why does it say explicit cast needed to convert int to byte.
But the value 30 is within the range of byte. What am I missing here?
Can anybody please explain.