Я решил свои собственные проблемы.
1) app.config ['MySQL_HOST'] = 'localhost' -> MySQL необходимо заменить на 'MYSQL'
простые орфографические ошибки ...
Stack<Card>[] decks = new Stack[9]; // Declare
Card c = decks[5].pop(); // This compiles - java 'knows' the type
Integer i = decks[4].pop(); // This will not compile
Joshua Bloch does an excellent job of describing this problem in Effective Java, Second Edition. Check out the relevant section on Google Book Search.
The advice he offers is to prefer lists to arrays. Your code might then look something like:
List<Stack<Card>> cards = new ArrayList<Stack<Card>>();
You can do the following, though this gives you a compiler "unchecked" warning.
Stack<Card>[] cards = (Stack<Card>[]) new Stack[52];
Why do you use arrays anyway ?
It is a low level programming structure.
Using List
or Set
instead (eg org.apache.commons.collections.list.LazyList
) if you don't want to bother with innitialization.
Or at least
Arrays.asList(new Stack[52])
to wrap an array into a list.
I couldnt reproduce jour error anywany .. :( perchaps it's because a different warning/errorlevel set.
Well, the array does not need to be a generic because he is always defined as this. Why do you think you have to cast? I think that eclipse is somewhat confused here.
It's to do with type erasure. Basically the generic types only exist at compile time and have no presence at run time
Have at look at this forum post for a better explanation.