class parent
{
public static int i()
{
return 42;
}
}
class child extends parent
{
int i;
public static void main(
String [] args)
{
parent c = new parent();
child t =(child)c;
System.out.println(t.i());
}
}
By theory the program shud rum n give de ouptput 42..but it s nt working..please help me out.give a gud explanation.
(not urgent, nothing is in this forun)
[ August 03, 2006: Message edited by: Barry Gaunt ]