I am very new to java but have been reading up a bit and was trying to make a fairly simple android app in Eclipse. I have the following line of code:
ArrayList<String> userNumbers = new ArrayList<>(Arrays.asList(userNumbersArray));
Of course, I get the error:
'<>' is not allowed for source level below 1.7
So I change the source level to 1.7 in Eclipse, and then I get the error:
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
So I do this; the compiler level then goes back to 1.6, and now I get the first error.
My question is if there is either a way for it to be compatible with android and with the diamond operator or if there is another way to write that line of code (still using an arraylist; it must be specified that it is a String).
Thank you in advance!