title: Trying to read through a character array in java
body: <p>I am a newcomer trying to learn java. I am doing a project for my class in which we are creating a hexadecimal-decimal converter. I already have the conversion finished, but when I print out the hexadecimal result, the letters (because hexadecimal contains A-F) print out in lowercase. I tried the following code to read through the character array and capitalize any lowercase characters:</p>
  
  <pre><code>int i = Integer.parseInt(input);
  String hex = Integer.toHexString(i);
  char[] hexchar = hex.toCharArray();
  for(int j=0; j&lt;=hexchar.length; j++){
     if(hexchar[j].equals("a")){
       hexchar[j]=hexchar[j].toUpperCase();
  } 
  }
  </code></pre>
  
  <p>I was going to set up this code for the letters a-f, but the error I keep getting is that a Char array can't be deferred. Does anyone know if there is a way to read through the char array or can submit a possible workaround? </p>