- Created Sunday, November 30th 2014 @ 13:29:46
I wanted to compare ArrayLists but it seems your Compiler doesn't support Java 8? Is this correct?
myHand = new ArrayList (); 101: Collections.sort(myHand, comparing(Card::getHeight));
src/bot/BotStarter.java:101: error: ';' expected Collections.sort(myHand, comparing(Card::getHeight));
Any ideas how to resolve this?
- Updated Sunday, November 30th 2014 @ 17:51:23
The roadmap has Java 8 still on it with a priority of "Low". So I don't think the engine supports it yet.
It's been a while since I worked with Java, but have a look at this: http://stackoverflow.com/questions/18441846/how-sort-a-arraylist-in-java. Instead of passing in comparing(Card::get height), you should be able to either declare a proper Comparator, or have your Card implement the 'Comparable' interface.