Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2901

Re: Java Basic Question: Enumeration & Vector

Newsgroups comp.lang.java.help
Date 2014-02-10 17:51 -0800
References <ANydnZZSbcxpSmXPnZ2dnUVZ_qGdnZ2d@giganews.com> <lvk3d3docu.fsf@saunalahti.fi> <7164706e-6262-4a32-9524-e951b7d84d6a@googlegroups.com> <lvd2iutzfj.fsf@saunalahti.fi>
Message-ID <6ce19f4c-cf54-4841-94c1-0b1874b100c4@googlegroups.com> (permalink)
Subject Re: Java Basic Question: Enumeration & Vector
From Lew <lewbloch@gmail.com>

Show all headers | View raw


Jukka Lahtinen wrote:
> Lew  writes:
> > Jukka Lahtinen wrote:
> >> isuy1 writes:
> >>> 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

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Java Basic Question: Enumeration & Vector isuy1 <isuy@socal.rr.com> - 2014-02-10 07:45 -0600
  Re: Java Basic Question: Enumeration & Vector Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-02-10 09:21 -0500
  Re: Java Basic Question: Enumeration & Vector Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2014-02-10 16:38 +0200
    Re: Java Basic Question: Enumeration & Vector Lew <lewbloch@gmail.com> - 2014-02-10 12:24 -0800
      Re: Java Basic Question: Enumeration & Vector Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2014-02-10 23:45 +0200
        Re: Java Basic Question: Enumeration & Vector Lew <lewbloch@gmail.com> - 2014-02-10 17:51 -0800
  Re: Java Basic Question: Enumeration & Vector rossum <rossum48@coldmail.com> - 2014-02-10 19:12 +0000
  Re: Java Basic Question: Enumeration & Vector Roedy Green <see_website@mindprod.com.invalid> - 2014-02-10 12:45 -0800
  Re: Java Basic Question: Enumeration & Vector isuy <isuy@socal.rr.com> - 2014-02-15 06:06 +0000
    Re: Java Basic Question: Enumeration & Vector Joerg Meier <joergmmeier@arcor.de> - 2014-02-15 13:23 +0100
      Re: Java Basic Question: Enumeration & Vector Roedy Green <see_website@mindprod.com.invalid> - 2014-02-15 10:09 -0800
        Re: Java Basic Question: Enumeration & Vector Joerg Meier <joergmmeier@arcor.de> - 2014-02-16 11:32 +0100
          Re: Java Basic Question: Enumeration & Vector Nigel Wade <nmw@ion.le.ac.uk> - 2014-02-17 09:41 +0000

csiph-web