Dear all:
I met a problem about how to call a method I need from a public interface in Java.What I've done in JCreator are:
1
Defined an internal class to implement the public interface.The internal class
only had a constructor.
class AA implements publicinterface
{
public AA()
{
}
}
2
Defined an object BB of the class AA.
AA BB = new AA();
3
To call the method at demanded position.
BB.methodname();
When I compiled source file ,JCreator reported error:
External class name.AA is not absract and does not override abstract method methodNameOfPublic in package.
Now I am confused by calling a method from public interface that belongs with a third-party SDK and all the necessary packages successfully imported in Java.
2006-11-16
23:14:22
·
2 answers
·
asked by
Joshua
1
in
Computers & Internet
➔ Programming & Design