Is instanceof operator expensive and bad to use?
There is always discussion about instanceof operator being expensive and performance intensive and should be avoided wherever possible.
Here is a review of instanceof which I liked :
http://www.velocityreviews.com/forums/t302491-instanceof-not-always-bad-the-instanceof-myth.html
Hope it clears all the questions about instanceof operator.
Happy coding :)