Closed Thread
Results 1 to 3 of 3

Thread: about the java.util.ArrayList

  1. #1
    R3.RyozKidz Guest

    about the java.util.ArrayList

    what is the meaning of the <E> at Class ArrayList<E> ...?

    ArrayList (Java 2 Platform SE 5.0)

  2. CODECALL Circuit advertisement

     
  3. #2
    whitey6993's Avatar
    whitey6993 is offline Programming Expert
    Join Date
    Dec 2008
    Posts
    435
    Rep Power
    15

    Re: about the java.util.ArrayList

    E is simply the variable name that refers to the class of the object that is being used in the array list. For example, if you wanted to declare an ArrayList of Integers, you would use the following code:

    Code:
    ArrayList<Integer> ints = new ArrayList<Integer>();
    In this case, E would refer to the Integer class. Generics in Java often use single character capital letters to represent these types of things. Hope this explanation helps.

  4. #3
    R3.RyozKidz Guest

    Re: about the java.util.ArrayList

    i get it ..~ looks like i have to study generic first ..~ haha

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ArrayList help
    By Ritwik I the programmer in forum Java Help
    Replies: 5
    Last Post: 08-14-2011, 11:42 AM
  2. C++ ArrayList Help
    By reaper in forum C and C++
    Replies: 1
    Last Post: 05-19-2011, 12:45 PM
  3. Java - Funny things with ArrayList
    By Turk4n in forum Classes and Code Snippets
    Replies: 0
    Last Post: 12-22-2008, 04:58 AM
  4. Need help with ArrayList...
    By Turk4n in forum Java Help
    Replies: 4
    Last Post: 12-03-2008, 10:14 AM
  5. ArrayList/Loops - Java Help
    By AllegraC in forum Java Help
    Replies: 1
    Last Post: 04-09-2008, 04:17 PM

Tags for this Thread

Bookmarks

Posting Permissions

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