Click to See Complete Forum and Search --> : Making a Set<T> class..wont work please help


p1kn1c
12-04-2005, 02:14 PM
hi, im doing an assignment and the code given is a basic Set<T> class..yet whenever i compile the given code i get two complier errors. Here is the code:

public class Set<T>{

}

Now there are ofcourse many methods within this and such but even after taking all of the out and having the code just be that i still get 2 errors.

One error is on the first line public class Set<T>{ where it says its expecting a "{" ..

the second is ofcourse on the last line where it says its expecting a "}"...this makes no sense at all to me..please help..its very frustrating.

evlich
12-04-2005, 04:27 PM
Check your compiler and make sure that you are compiling under java 5.0, other versions of java won't understand the generics.