This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hey, Here there are two methods one takes short while other one takes float, Since we passed a int value ,the method with float argument is taken and printed float. Since For Short you know that 16 bit is the range while for float it is 64bits. Assigning Wider Conversion is allowed ,while Narrowing the conversion then we need to use casting for it.