polymorphism and interfaces
        Posted  
        
            by mixm
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by mixm
        
        
        
        Published on 2010-05-17T17:19:08Z
        Indexed on 
            2010/05/17
            17:30 UTC
        
        
        Read the original article
        Hit count: 314
        
polymorphism
|overloading
if i have two classes x and y, both extend class w. and x implementing interface z. if i have methods doSomething(w object) and doSomething(x object), what would happen if i call doSomething(x)?
edit: im implementing this on java, more specifically on android. im asking this because some classes which implement a specific interface mostly does the same thing when doSomething() is called. but there are special cases which i would like to single out.
© Stack Overflow or respective owner