Thread: ArrayList
View Single Post
  #10 (permalink)  
Old 12-05-2007, 11:56 AM
kizilbas1 kizilbas1 is offline
Member
 
Join Date: Nov 2007
Posts: 15
kizilbas1 is on a distinguished road
Quote:
Originally Posted by hardwired View Post
[i]"cannot find symbol - variable getCost[i/]
Sounds like you were using getCost like you would a variable/field
Code:
aJob.getCost
Maybe you left off the "()" operator. Try
Code:
aJob.getCost();
instead.
when i call the job in constructor then this time says "cost has private access in job".
Change the access modifier of the getCost method from private to public so that it can be accessed from outside the class.

I have used the empty bracket and tried every solution but still comes up with the same error and getCost is already public.
Reply With Quote