Java literal value assignment behaviour
<p>In the book of SCJP guide by Kathy Sierra, in the assignments chapter, we learn that we can declare something like this <code>byte b = 7;</code>. Behind the scene the code is <code>byte b = (byte) 7;</code>. This is so because in java, number 7 is considered a literal int value so has be to cast to int.</p>

<p>Now other situation. Double can include every byte contained within a float value as it is a bigger datatype. So can we say <code>float f = 10.543;</code> As 10.543 is quite a small value and should fit within a float. Also literal value for such number is considered a Double so compiler should implicitly cast it to float. But it's not so, compiler stops us. We have to append an <code>F</code> or <code>f</code> after that value. </p>

<p>Why are these two conflicting behaviour there for literal value assignment? In short if <code>byte b = 7</code> is possible. Why is <code>float f = 10.543</code> not possible?</p>
