top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to implement only the speciefied methods when using interface in java?

+1 vote
427 views
How to implement only the speciefied methods when using interface in java?
posted Mar 17, 2014 by Sanjay Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
this condition we are using **abstract**  feature

1 Answer

+1 vote
public interface InterfaceA {       
    public void method1();
    void method2();
}


public abstract class ClassA implements InterfaceA  {
    public void method3() {
    }

    @Override
    public void method2() {
    }
}

your requirement helps when using abstract class

answer Mar 18, 2014 by Anand Kalagi
Similar Questions
+1 vote

how can change final data and methods in java?

+2 votes

The purpose of Inheritance is re-usability, we achieved multiple inheritance by using interface. but by using interface how re-usability concept achieved?

...