{
Public void the work ()
{
System. The out. Println (" President main work ");
}
}
The class Chickens extends Birds
{
Public void the work ()
{
System. The out. Println (" Chickens main work ");
}
}
The class Main
{
Public static void main (String [] args)
{
Birds s=new Chickens ();
S. ork ();
Birds z=new Birds ();
Z.w ork ();
Birds q=new Birds ();
If (q instanceof Chickens)//no error is normal?
{
Chickens p=(Chickens) q;
}
}
}
CodePudding user response:
Q instanceof Chickens this return falseCodePudding user response:
run no hint is run directly after success can increase some hints?? where