The first example you give is explicitly allowed in the Java Language Specification - see here. It says:
In addition, if the expression is a constant expression (§15.28) of type byte, short, char, or int:
- A narrowing primitive conversion may be used if the type of the variable is byte, short, or char, and the value of the constant expression is representable in the type of the variable.
But you'll notice it doesn't mention long, so that isn't allowed. Why? I can't tell, other than to say it's hard to think of a good reason why you'd need it.
1. You learn something new every day
2. Matthew is correct when he says "it's hard to think of a good reason why you'd need it".