• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ArrayList?

 
Ranch Hand
Posts: 664
Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Ranch Hand
Posts: 57
Python Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Python Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
reply
    Bookmark Topic Watch Topic
  • New Topic