title: Class implementing two interfaces with same method?
body: <pre><code>/* Class name : Fish.java */
  interface Fish 
  {
     public void eat();
     public void travel();
  }
  
  /* Class name : Mammals.java */
  interface Mammals 
  {public void eat();
     public void travel();}
  /*Amphibians mean living two lives (on land as well as on water). */
  </code></pre>
  
  <p>/<em>Main Class</em>/</p>
  
  <pre><code>public class Amphibians implements Mammals,Fish
   {
       public void eat()
     {          
     System.out.println("Amphibians eating");
     }
         public void travel()
     {
        System.out.println("Amphibians traveling");
     } 
  
  /*Main Method*/
     public static void main(String args[])
   {
        Amphibians a = new Amphibians();
        a.eat();
        a.travel();
     }
  </code></pre>
  
  <p>} </p>
  
  <p>Here interface implements in this class.Basically interface inheritances two or more class but here both different class in same method use then both method which way implement in one class. Please check error correct code.</p>