i am trying some java code like this
class Test {
public static void main (String [] args){
byte b = 10;
b = b + 10;
}
}
after saving when i tried to compile it , it is giving me an error
D:\java\Test.java:4: possible loss of precision
found : int required: byte b = b + 10; ^ 1 error
but there is no if try something like this
b++;
b+=10;
it is perfectly alright what is reason for this ?