Maashu,
Yes. It would still inherit the talk() method. Overriding that method
(making your own implementation) would do a different thing.
public abstract class FurryAnimal{
@Override
public void run() {
// TODO Auto-generated method stub
}
@Override
public void talk() {
// TODO Auto-generated method stub
System.out.println("I'm furry");
}
}
public class Man extends FurryAnimal {
public void study(){
System.out.println("I'm studying");
}
public void talk(){
}
}
If you remove the talk() method under man, it would execute it's
superclass' talk() method.
Experiment and code as much as possible as you would definitely need it
in job interviews =) .
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---