This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
You cannot cast a String to char. This will give you a compile time error. Why dont you make 'grade1' of type String instead of char. If for some reason you have to cast it from String to char type, than I would suggest using the toCharArray() method in the String class. The method will return you a new character array. Than by using some looping mechanism you can extract the required character and than apply your conditional constraints. Alternately you could also use the charAt(int index) method of the String class to do the conversion, note that the first char value of the sequence is at index zero('0').