java - How to implement the abstract method in interface? -
I am thinking how to implement an abstract method in an interface. Looking at this interface:
public interface analysis {public double getAverage (); } In order to implement an abstract method, do I declare the method as intangible?
public abstract double getAverage (); ?? Or declare the interface as an abstract?
Public abstract interface analysis {public double getAverage (); } Or need other things?
I have a class that implements the interface called sign : marks of public squares apply (some other code) Manufacturer mutator public double getAverage ();} So, my main problem is how to implement the abstract method in the interface?
< Div class = "post-text" itemprop = "text">
To create an intangible class implementing the interface:
Public abstract class AbstractAnalysis Applies analysis {public abstract double getAverage ();} to create a solid square to implement the interface:
public class mine Analysis applies {public double getAverage () {// TODO}} Or, it increases the intangible class to create a solid square and thus the interface is implemented:
Public class MyAnalysis offers AbstractAnalysis {public double getAverage () {// TODO}}
Comments
Post a Comment