Problem using the toUpperCase method with character array...

Hello :-)

I am making a program which prints out letters in a text file and the frequency that they occur. (see code below)
However, I am having difficulty converting the characters to uppercase before they go into the array

The output should look like this:LetterFrequencyA23B13
etc..

I have tried inserting things such as this:
character = character.toUpperCase();
...and also lots of similar variations...but I keep getting 'int cannot be dereferenced'

I think I am using the .toUpperCase() method wrong but I'm not sure how!

Would anyone be able to explain what the error means and how I should use the method correctly in order to insert uppercase letters into my character array?