Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
Members have full access to the forums. Advertisements are removed for registered users.
Given the String "welcome", what do you want to convert it to?
What do you want to print out?
i want to change to int.
Do you realise how vague your answer is. What int. The String "welcome" has no meaningful int value. Do you want its length? A sum of the ascii values? Some other highly complicated algorithm? What??????
Can you give a concrete answer. Like "welcome" should convert to 435643429.i want to change to int.
Then explain the algorithm that you used to make that conversion:
first letter * 23 + second letter *11 + ....