File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Comparing runtime type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Comparing runtime type" Watch "Comparing runtime type" New topic

Comparing runtime type

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 782

Let's suppose I have a method called checkType with the
signature as follows:

Within the checkType method, I want to be able to work
on only one specific types of Class. So I do this:

However I've also seen two other variations of this namely:

    Which one do you use most often and why ?


I agree. Here's the link:
subject: Comparing runtime type
It's not a secret anymore!