• Post Reply Bookmark Topic Watch Topic
  • New Topic

ArrayList?  RSS feed

 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's wrong here?




Output
C:\Documents and Settings\Jon\workspace\JavaDev\myCode Snippets\TenByTenArrayList.java:42: cannot find symbol
symbol : class ArrayList
location: class TenByTenArrayList
ArrayList<Integer> magicNumbersList = new ArrayList<Integer>();
^
C:\Documents and Settings\Jon\workspace\JavaDev\myCode Snippets\TenByTenArrayList.java:42: cannot find symbol
symbol : class ArrayList
location: class TenByTenArrayList
ArrayList<Integer> magicNumbersList = new ArrayList<Integer>();
^
2 errors

Tool completed with exit code 1

 
Edwin Torres
Ranch Hand
Posts: 57
Java Linux Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to get the item you just added, you can do this:

 
Edwin Torres
Ranch Hand
Posts: 57
Java Linux Python
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jon Camilleri wrote:
C:\Documents and Settings\Jon\workspace\JavaDev\myCode Snippets\TenByTenArrayList.java:42: cannot find symbol
symbol : class ArrayList
location: class TenByTenArrayList
ArrayList<Integer> magicNumbersList = new ArrayList<Integer>();
^
C:\Documents and Settings\Jon\workspace\JavaDev\myCode Snippets\TenByTenArrayList.java:42: cannot find symbol
symbol : class ArrayList
location: class TenByTenArrayList
ArrayList<Integer> magicNumbersList = new ArrayList<Integer>();
^
2 errors

Tool completed with exit code 1

Do you have an import statement for ArrayList at the top of your program?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!