I know that an object cannot be created from an interface like this :
List list2 = new List(); // error.
When i work with Arrays.asList(),i'm confused, because this function returns List and the following code works perfectly:
List list1 = Arrays.asList("a","b","c"); // works perfectly
Right side of this equation returns List. Then the code becomes List list1=new List(); How can this be possible and how this code works although the right side returns an interface, i didn't understand. Can you explain it please? Thanks in advance