The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
February 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Casting

Posted by Sriram on February 14, 2001 at 5:16 AM

I cannot understand your question clearly. But i have the following for u

if u cast convert as said below it's not a wrong because the object is of the type interface. u can find the same even in c++ when operating pointers.
myref = (myInterface) myObject();

and if u won't include all the methods in the interface in its child class you should declare it as 'abstract' class.

if still doubt please mail me




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us