Casting from an int to a byte is a narrowing conversion and therefore you have to do it explicitly. Essentially you are telling the compiler that you are aware that you are narrowing it and that you might lose precision. So instead of:

int number = 12;
byte smaller = number;

You would explicitly cast as such:

int number = 12;
byte smaller = (byte) number;

This way the compiler knows you realize you are making the primitive type a smaller type than it was before. However, if you were going from a byte to an int you would not need the cast:

byte answer = 42;
int biggerAnswer = answer;

That would compile fine, or you could cast it explicitly if you wanted to and it wouldn't hurt anything.

For more info, search this site for casting, or Google "java primitive casting".

SCJA
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."