Discussion:
Java Basic Question: Enumeration & Vector
(too old to reply)
isuy1
2014-02-10 13:45:24 UTC
Permalink
Hi, I would like some explanation please.

Suppose I have Vector v = new Vector();
Eric Sosman
2014-02-10 14:21:33 UTC
Permalink
Post by isuy1
Hi, I would like some explanation please.
Suppose I have Vector v = new Vector();
All right: I'm supposing it. What next?
--
Eric Sosman
***@comcast-dot-net.invalid
Jukka Lahtinen
2014-02-10 14:38:41 UTC
Permalink
Post by isuy1
Hi, I would like some explanation please.
Suppose I have Vector v = new Vector();
You could probably replace it with
List v = new LinkedList();
or
List v = new ArrayList();
--
Jukka Lahtinen
Lew
2014-02-10 20:24:01 UTC
Permalink
Post by Jukka Lahtinen
Post by isuy1
Hi, I would like some explanation please.
Suppose I have Vector v = new Vector();
Don't use raw types. 'Vector' is obsolete; use 'ArrayList' along the lines of what Jukka suggested,
but for the omission of generic arguments.
Post by Jukka Lahtinen
You could probably replace it with
List v = new LinkedList();
Except don't use raw types.
Post by Jukka Lahtinen
or
List v = new ArrayList();
It is a serious pedagogical flaw to present raw types.
--
Lew
Jukka Lahtinen
2014-02-10 21:45:04 UTC
Permalink
Post by Lew
Post by Jukka Lahtinen
Post by isuy1
Suppose I have Vector v = new Vector();
You could probably replace it with
List v = new LinkedList();
Except don't use raw types.
Right. The OP just didn't show what type the list is to be used for.
Of course, for lack of better knowledge, they could use
List<Object> v = new LinkedList<Object>();
--
Jukka Lahtinen
Lew
2014-02-11 01:51:05 UTC
Permalink
Post by Jukka Lahtinen
Post by Lew
Post by Jukka Lahtinen
Post by isuy1
Suppose I have Vector v = new Vector();
You could probably replace it with
List v = new LinkedList();
Except don't use raw types.
Right. The OP just didn't show what type the list is to be used for.
Of course, for lack of better knowledge, they could use
List<Object> v = new LinkedList<Object>();
Or
List<?> v = new LinkedList<>();
--
Lew
rossum
2014-02-10 19:12:34 UTC
Permalink
Post by isuy1
Hi, I would like some explanation please.
Suppose I have Vector v = new Vector();
A suggestion. Compose your whle post offline in your favourite
editor. Then cut and paste the whole thing into your news browser.

It looks to me like you only included a part of what you wanted to
ask.

rossum
Roedy Green
2014-02-10 20:45:59 UTC
Permalink
Post by isuy1
Hi, I would like some explanation please.
Suppose I have Vector v = new Vector();
See http://mindprod.com/jgloss/arraylist.html
and
http://mindprod.com/jgloss/generics.html

That will show you sample code for all the usual operations. Vectors
are rarely used any more. Iterators have largely replaced
Enumerators.
--
Roedy Green Canadian Mind Products http://mindprod.com
Because a thing seems difficult for you, do not think it
impossible for anyone to accomplish.
~ Marcus Aurelius 121-04-26 180-03-17
isuy
2014-02-15 06:06:01 UTC
Permalink
Post by isuy1
Hi, I would like some explanation please.
Suppose I have Vector v = new Vector();
Isuy1, what kind of joke is this? You are using my email address.


X-Received: by 10.236.86.77 with SMTP id v53mr9612434yhe.41.1392039924761;
Mon, 10 Feb 2014 05:45:24 -0800 (PST)
MIME-Version: 1.0
Path:
eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!k15no15826808qaq.0!news-out.google.com!s3ni13859qas.0!nntp.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 10 Feb 2014 07:45:24 -0600
From: isuy1 <***@socal.rr.com>
Subject: Java Basic Question: Enumeration & Vector
Newsgroups: comp.lang.java.help
X-UserIpAddress:
X-InternalId: e0aef9eb-1ad5-4e6d-9ac1-feab7555a778
Message-ID: <***@giganews.com>
Date: Mon, 10 Feb 2014 07:45:24 -0600
Lines: 3
X-Usenet-Provider: http://www.giganews.com
X-Trace:
sv3-CRvDGogXLHLELLFs+lLsW11JxLhBd9mCXStNRxGFM2adgEyA6TKnCS0il8sDJ9nwkKBbF3Uzo5Zp5q7!7zfXEBz8ok5IabfVqL0JWR5gapNRYQRLrCI3oBbB0WqlmiRQXZA73WJnhqp4VyGZ8WwyvfXHMTdk!eg==
X-Complaints-To: ***@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1011
Xref: news.eternal-september.org comp.lang.java.help:7847
Joerg Meier
2014-02-15 12:23:06 UTC
Permalink
Post by isuy
Post by isuy1
Hi, I would like some explanation please.
Suppose I have Vector v = new Vector();
Isuy1, what kind of joke is this? You are using my email address.
The problem appears to be on your end. Over here, it shows OP's From as:

From: ***@gmail.com

Liebe Gruesse,
Joerg
--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
Roedy Green
2014-02-15 18:09:52 UTC
Permalink
It shows as isguy here in Victoria BC.


Here is what the header looked like:

X-Received: by 10.236.86.77 with SMTP id
v53mr9612434yhe.41.1392039924761;
Mon, 10 Feb 2014 05:45:24 -0800 (PST)
MIME-Version: 1.0
Path: aioe.org!news.glorb.com!k15no15826808qaq.0!
news-out.google.com!s3ni13859qas.0!nntp.google.com!Xl.tags.giganews.com!
border1.nntp.dca.giganews.com!nntp.giganews.com!
local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 10 Feb 2014 07:45:24 -0600
From: isuy1 <***@socal.rr.com>
Subject: Java Basic Question: Enumeration & Vector
Newsgroups: comp.lang.java.help
X-UserIpAddress:
X-InternalId: e0aef9eb-1ad5-4e6d-9ac1-feab7555a778
Message-ID: <***@giganews.com>
Date: Mon, 10 Feb 2014 07:45:24 -0600
Lines: 3
X-Usenet-Provider: http://www.giganews.com
X-Trace:
sv3-CRvDGogXLHLELLFs+lLsW11JxLhBd9mCXStNRxGFM2adgEyA6TKnCS0il8sDJ9nwkKBbF3Uzo5Zp5q7!
7zfXEBz8ok5IabfVqL0JWR5gapNRYQRLrCI3oBbB0WqlmiRQXZA73WJnhqp4VyGZ8WwyvfXHMTdk!eg==
X-Complaints-To: ***@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1011
Xref: aioe.org comp.lang.java.help:7761
--
Roedy Green Canadian Mind Products http://mindprod.com
The future has already happened, it just isn’t evenly distributed.
~ William Gibson (born: 1948-03-17 age: 65)
Joerg Meier
2014-02-16 10:32:19 UTC
Permalink
Post by Roedy Green
It shows as isguy here in Victoria BC.
It seems to have changed - it shows that here now as well. At first I
thought maybe I just looked wrong the other day, but I can't find the email
I copied and pasted anywhere in the original post anymore.

Liebe Gruesse,
Joerg
--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
Nigel Wade
2014-02-17 09:41:26 UTC
Permalink
Post by Joerg Meier
Post by Roedy Green
It shows as isguy here in Victoria BC.
It seems to have changed - it shows that here now as well. At first I
thought maybe I just looked wrong the other day, but I can't find the email
I copied and pasted anywhere in the original post anymore.
Perhaps it was the next [spam] message, which in my client shows as being from that address.
--
Nigel Wade
Loading...