Java offset encoding -
Write a program that moves in a string and integer offset. In this program, we want to denote the string by increasing each character from the offset integer in alphabetical order. So if the integer offset is T1, then BC becomes Mn, Mn gets, and z becomes.
I will not write the program for you, but here are some helpful hints for receiving ball rolling. Went to:
- Look at the data type
char and wrapper class
characters . In ASCII
- Try to use
java.lang.String method
toCharArray () to break the input code. Array of letters
- After the array of letters based on your ASCII knowledge, decide how to increase / decrease each character from the specified value to get the result.
- Check for the cases of the edge (
'z' becomes
'a' , etc.) and
letters [] Array for an
string
I know if this does not make any sense, hopefully this answer will allow you to understand and learn more complex aspects of Java , While writing and implementing your code at the same time.
- Try to use
Comments
Post a Comment