Results 1 to 2 of 2
  1. #1
    bentho is offline Member
    Join Date
    Oct 2010
    Posts
    13
    Rep Power
    0

    Default String and sum int value of char

    1234
    Last edited by bentho; 09-20-2012 at 03:25 AM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default Re: String and sum int value of char

    Exception is never thrown in body of corresponding try statement
    The compiler is complaining that the caught exception is never thrown in the try block. Why are you trying to catch something that is not thrown?

    how to return the resulting characters in a string
    I don't see where there is anything to return in that method.

    Where is the sumOfLastThreeChar method?

    You can use arithmetic operators with char variables: 'a' + 4 or 'd' + 'e'
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Help with char and string
    By mehnihma in forum New To Java
    Replies: 13
    Last Post: 11-01-2011, 11:06 PM
  2. check a string char by char
    By Sotsiak in forum New To Java
    Replies: 2
    Last Post: 10-23-2010, 09:24 PM
  3. char to string
    By kian_hong2000 in forum New To Java
    Replies: 2
    Last Post: 08-25-2008, 01:51 PM
  4. Help with, String, Char
    By lenny in forum New To Java
    Replies: 1
    Last Post: 07-25-2007, 02:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •