1 Reply Latest reply: Dec 16, 2008 12:40 AM by 807589 RSS

    return statements when the return type of a method is an interface type???

    807589
      Hi guys,my return type of a method in a particular class is an interface type..and while composing the program it asks for return type..so, can u tell me how to implement the return statement when the method's return type is an interface type...for more preciseness here i am writing my code below....


      interface A
           {
                public void doSome(String thing);
           }

           public class Aimp implements A
           {
                public void doSome(String msg)
                {
                     
                }
           }
           
           class B
           {
                public A doIt(String msg)
                {
                **// how to write the return type when my return type is interface type (DOUBT HERE???)     **
                }
                
                public String exe()
                {
                     return "jhghj";
                }
                
                
           }