aspose file tools*
The moose likes Beginning Java and the fly likes what about Interface Type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what about Interface Type" Watch "what about Interface Type" New topic
Author

what about Interface Type

Raj chiru
Ranch Hand

Joined: Aug 12, 2008
Posts: 141
Hi..
My dout is .... The compiler checks the class of the reference type -not the object type -to see if you can call a method using that reference .
so what about the interfece reference type?
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874

raj chiru wrote:Hi..
My dout is .... The compiler checks the class of the reference type -not the object type -to see if you can call a method using that reference .
so what about the interfece reference type?


Raj,
Same strategy for interface as well ( as with class)
Raj chiru
Ranch Hand

Joined: Aug 12, 2008
Posts: 141
balu..Thanks for reply

But interfaces are abstract
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874


Raj,

Yes , Abstract classes cannot be instantiated , but it can call its own methods using its subclass objects. (polymorphism comes to picture here.)

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what about Interface Type