public abstract class Father_Test
{
public Father_Test()
{
System.out.println(createString());
}
public abstract String createString();
public static void main(String[] args)
{
new Son();
}
}
class Son extends Father_Test
{
private String str="chong";
@Override
public String createString()
{
// TODO Auto-generated method stub
return str.substring(0, 1);
}
}