I am using jdk1.8.0_121 on eclipse kepler (My OS is windows 7), I have created a simple project contained one class with static main method.
When I tried to create a list as follow
List l = Arrays.asList(1,2);
I got this error :
The method asList(T[]) in the type Arrays is not applicable for the arguments (int, int).
In case anyone else comes across a similar issue, I found that I had this error because I was importing
edu.emory.mathcs.backport.java.util.Arrays;
instead of
java.util.Arrays;
I have faced same issue like wrongly imported org.javers.common.collection.arrays
So removed that one and imported from Utils Arrays got
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With