List lands = new ArrayList();
Posted: Sun Jun 17, 2018 1:07 pm
Hi,
what's the error here??
public class countries {
public static void main(String[] args) {
List lands = new ArrayList();
lands.add("germany");
lands.add("austria");
lands.add("poland");
lands.add("luxomburg");
lands.add("switzerland");
System.out.println(lands.toString());
}
}
----------------------------------------------------------------------------------
Compilation Errors Detected
File: USER_173476/source/countries.java
Line: 4
cannot find symbol
symbol: class List
location: class countries
File: USER_173476/source/countries.java
Line: 4
cannot find symbol
symbol: class ArrayList
location: class countries
what's the error here??
public class countries {
public static void main(String[] args) {
List lands = new ArrayList();
lands.add("germany");
lands.add("austria");
lands.add("poland");
lands.add("luxomburg");
lands.add("switzerland");
System.out.println(lands.toString());
}
}
----------------------------------------------------------------------------------
Compilation Errors Detected
File: USER_173476/source/countries.java
Line: 4
cannot find symbol
symbol: class List
location: class countries
File: USER_173476/source/countries.java
Line: 4
cannot find symbol
symbol: class ArrayList
location: class countries