Hi I'm doing revision for an upcoming test and I've hit a problem I'm having trouble with.
I have to modify this code http://pastebin.com/ED2A7VWy to give a generic implementation of Queue. The problem is that the Queue uses an array and for some reason the generics don't seem to play nicely with arrays. I've tried:
public class Queue<E>{
private E[] eArray = new E[5];
...
}
but that doesn't seem to work.