What's an example of duck typing in Java?

Posted by Cuga on Stack Overflow See other posts from Stack Overflow or by Cuga
Published on 2009-07-03T15:08:15Z Indexed on 2010/04/06 2:33 UTC
Read the original article Hit count: 556

Filed under:
|
|

I just recently heard of duck typing and I read the Wikipedia article about it, but I'm having a hard time translating the examples into Java, which would really help my understanding.

Would anyone be able to give a clear example of duck typing in Java and how I might possibly use it?

© Stack Overflow or respective owner

Related posts about java

Related posts about duck-typing