Help with initializing Lists
So I know this is a really basic question but... I couldn't find an answer anywhere online. I'm trying to initialize a List with the following line of code:
List<String> messages = ArrayList();
JCreator gives me an error in trying to compile it saying it can't find the symbol "List". What am I doing wrong? Sorry, I haven't used lists in ages. Is there something I need to import for it to work?
Re: Help with initializing Lists
You know what, I answered my own question actually. I took a look through one of my old textbooks and found out you need to import java.util.*. Also my format for initilization is all wrong too. I should have looked harder before I wasted your time here, I'm sorry.