public class GeneralizationsD {
public static void main(String[] args) {
for(String sport : sports)
ArrayList<String> sports= new ArrayList<String>();
The code comes out with an error.
GeneralizationsD.java:10: error: variable declaration not allowed here
ArrayList sports= new ArrayList();
^
1 error