Java 4일차 ObjectCasting 테스트

public class ObjectCastingTest {}

class SubCastingTest extends ObjectCastingTest
{
public void test()
{
SubCastingTest sct = new SubCastingTest();
ObjectCastingTest oct = new SubCastingTest();

sct = (SubCastingTest)oct;
}
}

댓글 없음: