Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8677
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!6g2000prh.googlegroups.com!not-for-mail |
|---|---|
| From | KevinSimonson <kvnsmnsn@hotmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | What Does it Mean to Pass a Generic Class Itself as a Parameter? |
| Date | Mon, 10 Oct 2011 08:01:34 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 30 |
| Message-ID | <c534ac30-345e-4467-ba44-5d719d8c22ca@6g2000prh.googlegroups.com> (permalink) |
| NNTP-Posting-Host | 216.49.181.254 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1318258979 24183 127.0.0.1 (10 Oct 2011 15:02:59 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Mon, 10 Oct 2011 15:02:59 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | 6g2000prh.googlegroups.com; posting-host=216.49.181.254; posting-account=gsXmKQkAAADuyNfZpkeBrCCcqQvlDvn9 |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-Header-Order | ARLUEHNKC |
| X-HTTP-UserAgent | Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; InfoPath.2; .NET4.0E; .NET4.0C),gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8677 |
Show key headers only | View raw
I'm currently taking a class pretty much each week to prepare for the
SCJP exam. In the classes we usually go over practice exams and try
to figure out what the right answer is to a number of the questions.
After the chapter on Generics, one of the questions involved a class
like the one I call {Wierd} here. It was kind of of the form:
public class Wierd< T extends Wierd>
{
public Wierd ()
{
}
}
and then we had a class of the form:
public class Hmm
{
public static void main ( String[] arguments)
{
Wierd< Wierd> wow = new Wierd< Wierd>();
}
}
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? And what exactly is happening in
{main()} when I declare {wow} to be a {Wierd< Wierd>} object? I'd
really appreciate it if someone could explain this to me.
Kevin Simonson
Back to comp.lang.java.programmer | Previous | Next — 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