Search:

Type: Posts; User: 999cm999

Search: Search took 0.06 seconds.

  1. Replies
    4
    Views
    1,354

    Re: Arrays and Generics

    Ok, well I figured my other issue out myself...basically when using:


    for (T t : myList)


    I had to do this when performing math operations:
  2. Replies
    4
    Views
    1,354

    Re: Arrays and Generics

    Oh ok, that makes sense.

    I changed my for loop to use type "T"...

    once in the loop, I need to apply math operations to the data, but I can't use addition, subtraction, etc on type "T". How...
  3. Replies
    4
    Views
    1,354

    Arrays and Generics

    I'm having trouble with a generic method that can accept ArrayLists of type integer and type double.

    The program fails to compile because it says myList is of type "T" and i is of type "double".
    ...
Results 1 to 3 of 3