Arrays in java

Hey everyone,

I’v been reading this section, in java: I notice that they use ArrayList<String> list = new ArrayList<String>(); rather than String[] list = new String[num]. I input it into my eclipse compiler, but it shows an error. Could someone help me with figuring why this happens?

import java.util.ArrayList;

1 Like

Thanks for the reply!