Computer Science Canada Question about instanceof |
Author: | Aziz [ Sun Jul 30, 2006 4:09 pm ] | ||||
Post subject: | Question about instanceof | ||||
I can dp
but when I try
I get a 'illegal start of type' compiler error. Been working on this for a bit, any help would be appreciated. |
Author: | bugzpodder [ Sun Jul 30, 2006 11:14 pm ] |
Post subject: | |
if i remember correctly, .getClass() method returns an object of Class Class. its kind of confusing, look up the API |
Author: | Aziz [ Mon Jul 31, 2006 5:10 pm ] |
Post subject: | |
Yeah, it does, Class<E> or something-another. I figure out a different way to do what I want, however, and better IMO. Instead of comparing classes, I added an equals() method to Element and I can just compare them. However, I'd still like to figure this out, as it could have other uses. Thanks bugz |
Author: | rizzix [ Tue Aug 01, 2006 7:12 am ] | ||
Post subject: | |||
|