Hi i am new to Java and i hav a program to do where i am given an interface with all its methods in it then i am given a class that implements the interface but also has some of its own methods. But a method in the interface is given as a method in class, (they have the same name and parameters). Do you have separate code for each method?
TriniBabe
0
Newbie Poster
Recommended Answers
Jump to PostInterfaces do not have any code themselves. They are a set of method declarations that are required by a class that implements that interface. The interface is a guarantee that those methods are available on any class that implements it. The code for those methods goes in the class that …
All 3 Replies
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
TriniBabe
0
Newbie Poster
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.