jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes subclass and generics Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "subclass and generics" Watch "subclass and generics" New topic

subclass and generics

Jacky Zhang

Joined: Sep 17, 2006
Posts: 18
A generics place holder as:
<T extends Number>

T can be Integer, Float, Double, etc.
But could T be Number itself?

If so Number can be seen as a "subclass" of Number, can't it?
Petrus Pelser
Ranch Hand

Joined: Feb 20, 2006
Posts: 132
An object of a class is a subclass of itself. So your statement is correct. Number will be a subclass of Number.
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
Check this thread.
Also this one.
[ September 18, 2006: Message edited by: wise owen ]
I agree. Here's the link: http://aspose.com/file-tools
subject: subclass and generics
It's not a secret anymore!