Java method for parameters with multiple inheritance

I don’t know why I can’t find this answer online.

I have a class that implements multiple methods, and I want to write methods to expect them .I don’t know how to do it, or it’s even possible.

For example:

public void yellAtPet( arg) {
arg.yellAt("Don't go there!");
arg.pet("Good Boy");
}

This should work as a generic method without making the entire class generic:

public  void yellAtPet(T arg) {
arg.yellAt("Don't go there!");
arg.pet("Good Boy");
}

I don’t know why I can’t find this answer online.

I have a class that implements multiple methods, I want to write methods to expect them. I don’t know how to do it, or maybe even possible.

For example:

public void yellAtPet( arg) {
arg.yellAt("Don't go there!");
arg.pet("Good Boy");
}

This should work as a generic method without making the entire class generic:

public  void yellAtPet(T arg) {
arg.yellAt("Don't go there!");
arg.pet("Good Boy");}

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2817 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.