Get method which is undefined in interface in java -


i have interface "messenger", defines 4 methods. in "messengereng" class, inherit "messenger" interface , add 1 undefined method "msgexample". question: how access "msgexample" method (which not defined in "messenger" interface) ?

you cast desired type. example:

messenger msg = new messengereng(); ((messengereng) msg).methodnotinterface(); 

this unsafe cast though, use if @ all.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -