Submitted by heartin on Sun, 09/29/2013 - 03:22
Casting is the conversion of data of one type to another type either implicitly or explicitly.
Casting happens for both primitive types and reference types.
If the casting operation is safe, java will do automatic type casting. This is called implicit type casting.
If java can't be sure whether the casting will be safe, java will not do automatic casting, but programmer can do the casting if he is sure about the outcome. This is called explicit type casting.
Submitted by heartin on Wed, 09/25/2013 - 19:59