Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #15201
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
|---|---|
| From | Broad Liyn <broadliyn@gmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: unchecked conversion warning. |
| Date | Sun, 10 Jun 2012 21:52:23 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 35 |
| Message-ID | <265ea956-a3ed-4e76-8fc9-9ce9728f6b37@googlegroups.com> (permalink) |
| References | <3s7cs7hd18l0ffci55ns0286n4lc4cutlu@4ax.com> |
| NNTP-Posting-Host | 124.90.212.120 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | posting.google.com 1339390344 13875 127.0.0.1 (11 Jun 2012 04:52:24 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Mon, 11 Jun 2012 04:52:24 +0000 (UTC) |
| In-Reply-To | <3s7cs7hd18l0ffci55ns0286n4lc4cutlu@4ax.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=124.90.212.120; posting-account=ZqBWVwoAAAD9GyoEs0nPtgdheCcML1v7 |
| User-Agent | G2/1.0 |
| Xref | csiph.com comp.lang.java.programmer:15201 |
Show key headers only | View raw
在 2012年5月30日星期三UTC+8下午9时32分43秒,(未知)写道:
> This code compiles with an 'unchecked conversion' warning.
> I have tried various corrections, for example casting like (Vector<Object>), but to no
> avail.
> What am I doing wrong?l
> The code is the smallest demo I could make from the original application.
>
> import java.util.Vector;
> public class genericsdemo
> {
> private static Vector<Vector> vdata = new Vector<Vector>(); //a Vector of Vectors
> private static Vector<Object> vrow = new Vector<Object>(); //a row
>
> public static void main(String args[]) {
> vrow.add(null); //two columns in the row
> vrow.add(null);
>
> vdata.add(vrow); //add the row to the Vector of Vectors
>
> Vector vtmp = getrow(); //test
> }
>
> private static Vector<Object> getrow() {
> return vdata.elementAt(0); //warning: [unchecked] unchecked conversion
> }
> }
>
> JensJ
1.vector is no longer being supported.
2.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
unchecked conversion warning. Jens - 2012-05-30 15:32 +0200
Re: unchecked conversion warning. Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-05-30 13:48 +0000
Re: unchecked conversion warning. Jens - 2012-05-30 15:52 +0200
Re: unchecked conversion warning. Robert Klemme <shortcutter@googlemail.com> - 2012-05-30 07:54 -0700
Re: unchecked conversion warning. Jens - 2012-05-31 22:23 +0200
Re: unchecked conversion warning. Lew <lewbloch@gmail.com> - 2012-05-31 13:40 -0700
Re: unchecked conversion warning. Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-05-31 16:50 -0400
Re: unchecked conversion warning. Lew <lewbloch@gmail.com> - 2012-05-31 17:18 -0700
Re: unchecked conversion warning. Robert Klemme <shortcutter@googlemail.com> - 2012-06-01 08:14 +0200
Re: unchecked conversion warning. Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-06-01 08:48 -0400
Re: unchecked conversion warning. Robert Klemme <shortcutter@googlemail.com> - 2012-06-01 07:32 -0700
Re: unchecked conversion warning. Roedy Green <see_website@mindprod.com.invalid> - 2012-06-10 12:16 -0700
Re: unchecked conversion warning. Martin Gregorie <martin@address-in-sig.invalid> - 2012-06-10 22:08 +0000
Re: unchecked conversion warning. Lew <noone@lewscanon.com> - 2012-06-10 17:09 -0700
Re: unchecked conversion warning. Martin Gregorie <martin@address-in-sig.invalid> - 2012-06-11 01:31 +0000
Re: unchecked conversion warning. Jim Janney <jjanney@shell.xmission.com> - 2012-06-01 08:41 -0600
Re: unchecked conversion warning. Patricia Shanahan <pats@acm.org> - 2012-06-01 08:44 -0700
Re: unchecked conversion warning. markspace <-@.> - 2012-06-01 09:08 -0700
Re: unchecked conversion warning. Gene Wirchenko <genew@ocis.net> - 2012-06-01 09:31 -0700
Re: unchecked conversion warning. Jim Janney <jjanney@shell.xmission.com> - 2012-06-01 11:02 -0600
Re: unchecked conversion warning. Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-06-01 13:54 -0400
Re: unchecked conversion warning. Patricia Shanahan <pats@acm.org> - 2012-06-01 16:44 -0700
Re: unchecked conversion warning. Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-06-01 20:24 -0400
Re: unchecked conversion warning. Patricia Shanahan <pats@acm.org> - 2012-06-01 19:36 -0700
Re: natural/native language capabilities (was: unchecked conversion warning.) Jim Janney <jjanney@shell.xmission.com> - 2012-06-01 11:01 -0600
Re: unchecked conversion warning. Roedy Green <see_website@mindprod.com.invalid> - 2012-06-10 12:13 -0700
Re: unchecked conversion warning. Arne Vajhøj <arne@vajhoej.dk> - 2012-06-20 19:28 -0400
Re: unchecked conversion warning. Broad Liyn <broadliyn@gmail.com> - 2012-06-10 21:52 -0700
Re: unchecked conversion warning. Lew <noone@lewscanon.com> - 2012-06-10 23:50 -0700
Re: unchecked conversion warning. Patricia Shanahan <pats@acm.org> - 2012-06-11 00:06 -0700
Re: unchecked conversion warning. Robert Klemme <shortcutter@googlemail.com> - 2012-06-16 15:17 +0200
Re: unchecked conversion warning. Lew <lewbloch@gmail.com> - 2012-06-18 12:28 -0700
Re: unchecked conversion warning. Robert Klemme <shortcutter@googlemail.com> - 2012-06-19 23:14 +0200
Re: unchecked conversion warning. Lew <lewbloch@gmail.com> - 2012-06-19 17:15 -0700
Re: unchecked conversion warning. Arne Vajhøj <arne@vajhoej.dk> - 2012-06-20 19:22 -0400
Re: unchecked conversion warning. Arne Vajhøj <arne@vajhoej.dk> - 2012-06-20 19:20 -0400
csiph-web