Issue | Solved - Type mismatch : cannot convert from Arraylist to List

You must be wondering to see this error on initializing an ArrayList as you recently read from some source. It says "Type mismatch: cannot convert from ArrayList to List".


This is because you have not imported correct library. 

java.util is the library for Collections. 

java.awt.List is a List component used in GUI where as java.util.List is an interface for the lists data structure.

No comments :

Post a Comment