blob: 148422b005889589a520d65d08507421525c1af9 [file] [log] [blame]
class TestCasting
{
public void testRedundantCast() throws Exception
{
Object o = getObject();
double d = 0.0;
if( o instanceof Integer )
{
d = (double) (Integer)o;
}
System.out.println( "d = " + d );
}
private Object getObject()
{
return new Integer(42);
}
}