Article View: borland.public.jbuilder.java.api
Article #1028proper/suggested way to compare if one class is an instance of another?
From: PeterH
Date: Tue, 30 Apr 2002 15:51
Date: Tue, 30 Apr 2002 15:51
7 lines
1046 bytes
1046 bytes
What is the proper or suggested way to compare if one class is of another type/class? Should the .getClass() be used to compare it with the .class? Or should the instanceof keyword be used? Thanks.
Technical Details
Message-ID:
<3ccebd9c_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!cox.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,4bc02a730daffc47,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-04-30 08:52:38 PST From: "PeterH" <!REMOVEBeforeSending!peter@pchenry.com> Newsgroups: borland.public.jbuilder.java.api Subject: proper/suggested way to compare if one class is an instance of another? Date: Tue, 30 Apr 2002 11:51:58 -0400 Lines: 10 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 66.46.195.190 Message-ID: <3ccebd9c_2@dnews> X-Trace: dnews 1020181916 66.46.195.190 (30 Apr 2002 08:51:56 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!cox.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews