A String is not an array of characters in Java (in this Java differs from for example C and Pascal).
The compiler is quite correct and extremely helpful in pointing out that you're trying to use a String as if it were an Array (yes, arrays are also objects).
Reputation Points: 1658
Solved Threads: 331
duckman
Offline 7,719 posts
since Nov 2004