Oh....duh...sometimes you just need another pair of eyes to take a look! Thanks! :)
Type: Posts; User: 999cm999
Oh....duh...sometimes you just need another pair of eyes to take a look! Thanks! :)
I have a generic linked list with an iterator(code below).
public static void main(String[] args)
{
LinkedListStuff<String> myStuff = new LinkedListStuff<String>();...
Sorry, here is the compile error:
MyMathClass.java:29: incompatible types
found : T
required: double
for (double i : myList) {
^
1 error
Hi everyone,
I've been working on this for days. My "program" is supposed to take an integer or double arrayList of numbers, and then calculate the standard deviation of those numbers using a...
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:
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...
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".
...