Java interface 'interview'-style problem

Posted by Codenotguru on Stack Overflow See other posts from Stack Overflow or by Codenotguru
Published on 2010-04-23T23:19:18Z Indexed on 2010/04/23 23:33 UTC
Read the original article Hit count: 130

Filed under:

Problem/Task:

Write an interface with one method and two classes that implement this interface. Now write a main method with an array that holds an instance of each class. Using a for-each loop, invoke the method upon each item.

Is this an interview question? (I'm not sure if the author meant to post this as a question or was looking for an answer to the above.)

© Stack Overflow or respective owner

Related posts about java