Can a Class implement two interfaces with the same method signature

I created two interfaces with same method signature.
You can actually implement the method only once.

package com.anjana;
public interface Interface2 {
public String printme();
package com.anjana;
public interface Interface1 {
public String printme();
package com.anjana;

public class Employee implements Interface1,Interface2,Interface3{
public String printme() {
return "Hello";

public static void main(String args[]){
Interface1 emp1=new Employee();
Interface2 emp2=new Employee();
This will be misleading if you have to do some operations based on the returned value.


  1. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Core spun Melange


Post a Comment

Popular posts from this blog

Spring MVC- Redirect from one controller to another

Integrating Struts2 with Spring Security using Custom Login Form