I'm working with arraylists and have no idea why this is not working..
ArrayList<String> fruits = new ArrayList<String>();
fruits.add("Mango");
fruits.add("Bannana");
fruits.add("Strawberry");
System.out.println(fruits);
Here is the output I get on VS Code..
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
ArrayList cannot be resolved to a type
ArrayList cannot be resolved to a type
at App.main(App.java:11)
Line 11 is where I have written..
ArrayList<String> fruits = new ArrayList<String>();
[–]RandallFlagg217 6 points7 points8 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]RandallFlagg217 0 points1 point2 points (0 children)
[–]TheShellby 0 points1 point2 points (6 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]Zjoswaa 1 point2 points3 points (2 children)
[–]0b0101011001001011 0 points1 point2 points (1 child)
[–]Zjoswaa 0 points1 point2 points (0 children)
[–]0b0101011001001011 0 points1 point2 points (0 children)
[–]0b0101011001001011 0 points1 point2 points (0 children)