There is an exception to "narrowing conversion". In case of "narrowing conversion" we always do explicit casting.Like if we are assining an int value to a byte value. int i = 10; byte b = (byte)i; But we can also do narrowing conversion with out any explicit casting. For this we have to remember two things. 1) The value which we are going to assign must be final. 2) The value which we are going to assign should accommodate well into the data type length of the variable where we are going to assign. For example, final int i = 10; byte b = i; This will not give any compilation error. final int i = 129; byte b = i; But this will give any compilation error.Here we need explicit casting.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Journal Article - SCJP Tip Line - Implicit Conversions, Explicitly