Results 1 to 3 of 3
  1. #1
    geniusxiayi is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Question about Arrays.asList source

    The source of Arrays.asList in jdk is as follow:
    public static <T> List <T> asList(T... a) {
    return new ArrayList <T>(a);
    }
    the question is that I can't find the constructor ArrayList <T>(T[]),
    and when I put this code into eclipse,it prompts an error
    The constructor ArrayList <T>(T[]) is undefined.

  2. #2
    geniusxiayi is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Default

    oh~I get it ,there is a inner class ArrayList<E> inside the Arrays class

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Java API source
    By Mr.Beans in forum NetBeans
    Replies: 5
    Last Post: 04-10-2009, 04:02 AM
  2. Replies: 0
    Last Post: 01-29-2009, 10:43 AM
  3. Replies: 1
    Last Post: 11-28-2008, 06:27 PM
  4. Need a source code
    By vissu007 in forum New To Java
    Replies: 1
    Last Post: 07-05-2007, 07:08 PM
  5. GNU Source-highlight 2.7
    By levent in forum Java Software
    Replies: 0
    Last Post: 06-12-2007, 08:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •