I am new in Java.I tried to collect some Callable by List.
List<Callable<Long>> callables=new ArrayList<>()
But complier gave me "Cannot infer type arguments for ArrayList<>". Then I chang the code to :
List<Callable<Long>> callables=new LinkedList<>();
There is no error message.why I can't use ArrayList to Implement?? Thanks!!