It's not a secret anymore!
The moose likes Beginning Java and the fly likes Interface implementation problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Interface implementation problem" Watch "Interface implementation problem" New topic

Interface implementation problem

Kumar Sushil

Joined: Jan 31, 2006
Posts: 29
I found this Q. in mock Exam

interface TestA {
String toString();

public class Test implements TestA{
public static void main(String[] args){

If, we implement an interface, this is necessary that we implement methods of that interface. But here this not happening. Is this due to toString() method of Object class?
marc weber

Joined: Aug 31, 2004
Posts: 11343

Originally posted by johny martin:
...Is this due to toString() method of Object class?

Yes, the implementation is inherited from Object.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
I agree. Here's the link:
subject: Interface implementation problem
jQuery in Action, 3rd edition