aspose file tools*
The moose likes Beginning Java and the fly likes ArrayList compile time error - cannot resolve symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ArrayList compile time error - cannot resolve symbol" Watch "ArrayList compile time error - cannot resolve symbol" New topic
Author

ArrayList compile time error - cannot resolve symbol

achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
Hiya.
This is a follow on question from the previous question
http://www.coderanch.com/t/395661/java/java/NullPointerException-when-String
I'm getting the compile time error

cannot resolve symbol
method add (java.lang.STring, java.lang.String)
interface java.util.List;
.....txRecord.add(lst_acctName[var_counter],

when I try to compile following code. I cannot see what javac if faulting.


humanum errare est.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

As the error message says, the List interface doesn't have any "add" method that takes two Strings as arguments. What are you expecting this method you've invented to do?


[Jess in Action][AskingGoodQuestions]
achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
Hi.
Thanks for replying.
I intend it to store 1,2, or more records with a given record structure.
During runtime, other applets will be querying var_counter, update it eg. var_counter+=1; assign new values to the runtime variables which are then assigned to the record. It doesn't matter that it is transient, at the end it will be flushed to a database.
The size of the array is interminate at the beginning.
achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
Okay, saw the error, compiles okay like this but pretty convoluted:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ArrayList compile time error - cannot resolve symbol