This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

More examples of such code..

 
jose chiramal
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15492
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
jose chiramal
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I would like to know how the instanceof operator can be used with interface references and with objects.

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just for future reference: you don't need to post again, you can use the button to edit a post.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic