Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8680
| From | markspace <-@.> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? |
| Date | 2011-10-10 09:12 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <j6v5ha$e7s$1@dont-email.me> (permalink) |
| References | <c534ac30-345e-4467-ba44-5d719d8c22ca@6g2000prh.googlegroups.com> |
On 10/10/2011 8:01 AM, KevinSimonson wrote:
> Can anyone tell me what's going on here? In {Wierd} itself is the
> {Wierd} that's being extended in the angle brackets the same {Wierd}
> that's being defined in this file?
Yes. Extension, and polymorphism, just mean "type." Weird is a type of
Weird, so it fulfills the bound that the type of T must be a type of
Weird (extends Weird).
> And what exactly is happening in
> {main()} when I declare {wow} to be a {Wierd< Wierd>} object?
Well, you didn't do anything with the type parameter T, so not a lot is
happening. Try to find some existing classes that use type parameters,
like the Collections classes, and ask that question for them.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
What Does it Mean to Pass a Generic Class Itself as a Parameter? KevinSimonson <kvnsmnsn@hotmail.com> - 2011-10-10 08:01 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-10 12:11 -0400
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-10 12:56 -0400
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? markspace <-@.> - 2011-10-10 09:12 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Patricia Shanahan <pats@acm.org> - 2011-10-10 09:31 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Lew <lewbloch@gmail.com> - 2011-10-10 12:12 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-10 13:32 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-10 16:40 -0400
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Lew <lewbloch@gmail.com> - 2011-10-10 14:29 -0700
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Screamin Lord Byron <scre@min.dot> - 2011-10-10 19:07 +0200
Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-11 02:08 -0400
csiph-web