File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes More examples of such code.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "More examples of such code.." Watch "More examples of such code.." New topic
Author

More examples of such code..

jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
I want to understand the two blocks used in the below code. Also where can i find more examples of such code :
jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
Sorry for posting multiple times.. Was trying to get the format correct. I would like to understand the if block used here. Whats this concept called as ?

Thanks
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14144
    
  18

It's just a normal if-statement. Do you mean that you want to learn what the instanceof operator does?

You can find that here in Sun's Java Tutorials: The Type Comparison Operator instanceof (scroll down on that page).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
Yes I would like to know how the instanceof operator can be used with interface references and with objects.

Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41816
    
  62
Just for future reference: you don't need to post again, you can use the button to edit a post.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: More examples of such code..