In Learn Java: ArrayLists, Accessing Index, there is an error or typo in the example code given in the explaination.
The example code given is as follows:
ArrayList<String> shoppingCart = new ArrayList<shoppingCart>(); shoppingCart.add("Trench Coat"); shoppingCart.add("Tweed Houndstooth Hat"); shoppingCart.add("Magnifying Glass"); System.out.println(shoppingCart.get(2));
In this code the second set of angular brackets contain shoppingCart, but I think they should contain String, like with the first set. I tried testing the code as given to see if it would work and it gave an error, but when I made the change I mentioned it functioned as the explaination said it would (prints out Magnifying Glass).
To be clear, this is found in the explaination on the left, not the pre-written code in the middle.
To gather information for a bug report we need the following information:
Topic Title: Course name + section + what type of bug(is it a typo, instructions error, broken URL, SCT issue)
For the Post:
Summery of the report:
Steps to Reproduce:
Fix or Workaround:
Please attach screenshots
Please also tag your bug report with the appropriate language.
Thank You we appreciate your assistance in making Codecademy a better learning place!