Greetings,
I am wondering on how these statement is illustrated.
How is ClassExtended connected to ClassInterface? Is it inherited or extended?Code:ClassInterface data = (ClassInterface)ClassExtended.staticMethod();
Thanks,
Cyril H.
Printable View
Greetings,
I am wondering on how these statement is illustrated.
How is ClassExtended connected to ClassInterface? Is it inherited or extended?Code:ClassInterface data = (ClassInterface)ClassExtended.staticMethod();
Thanks,
Cyril H.
Who knows, without the code for those classes and/or interfaces?
Recommended reading: How To Ask Questions The Smart Way
db
All we can say, given your small code snippet and nothing else, is that ClassExtended contains a method named staticMethod() and it returns (*) an object of type ClassInterface. Only you know how ClassExtended is related to ClassInterface. I consider this a very vague question.
kind regards,
Jos
(*) it should return such object or else the cast fails.
None. Please make your question more specific to get a more specific answer