»Array help

General discussion on technical and managerial topics
no avatar
Luis93
 
Posts: 6
Joined: Sat Jan 12, 2013 11:27 am

»Array help

by Luis93 » Mon Jan 21, 2013 9:18 pm

Hi, i am having trouble getting the following String array to run correctly and having compile error. My compile error is posted below.



stapler.java:94: error: cannot find symbol
System.out.println("Product name: " +stapler.getnames[0]);
^
symbol: variable getnames
location: variable stapler of type Stapler
stapler.java:105: error: cannot find symbol
System.out.println("Product name: " +stapler1.getnames[1]);
^
symbol: variable getnames
location: variable stapler1 of type Stapler
stapler.java:116: error: cannot find symbol
System.out.println("Product name: " +stapler2.getnames[2]);
^
symbol: variable getnames
location: variable stapler2 of type Stapler
3 errors
Last edited by Luis93 on Sat Feb 02, 2013 12:47 am, edited 2 times in total.

no avatar
tutorialspoint
Site Admin
 
Posts: 144
Joined: Fri Apr 27, 2007 6:52 pm

by tutorialspoint » Wed Jan 23, 2013 3:17 am

Please provide your code in the forum to get help

Return to General Discussion

cron