Search the Community
Showing results for tags 'dereferenced'.
Found 1 result
-
Why does this give an error and how do I fix it? :confused: [CODE] public static String capitalizeString(String stringTo) { String newString = ""; //Converts the string to a CharArray char stringarray[] = stringTo.toCharArray(); //Sets the first letter of the CharArray to UpperCase //This line gives an error stringarray[0] = stringarray[0].toUpperCase(); //Converts the CharArray back to a String for (int i = 0; i < stringarray.length; i++) { newString = newString + stringarray[i]; } //Returns the newly capitalized string return newString; } [/CODE]
- 2 replies
-
- char
- dereferenced
-
(and 2 more)
Tagged with: