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 Comparing runtime type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Comparing runtime type" Watch "Comparing runtime type" New topic
Author

Comparing runtime type

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

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:

    [list]
    [/list][list]
    [/list]
    Which one do you use most often and why ?
    Pho

Regards,

Pho
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Comparing runtime type
 
Similar Threads
code generation/bytecode modification
difference between instantion and object.
Whats the difference between ..( Vector class )
compareTo()
Something that i dont understand : Passing Objects as elements at the end of a list