Hullo! I'm a first year CS student at Lancaster and I'm really struggling with the Java module. I'm hoping it'll all click into place soon. Not sure how appropriate it is to copy-pasta the whole question.
But I have to write an encode class that takes a String as its input parameter and returns an array of int values, based on a message the user inputs. Each int will be the ASCII value for each character in the original string.
We have to cast each char as an int, but the original message is a String. So I really have no clue what to do.
I understand the concept of arrays but **** me if I can use them!
I've probably not explained that too well, but like I say I don't know whether its kosher to show the whole question.
But I have to write an encode class that takes a String as its input parameter and returns an array of int values, based on a message the user inputs. Each int will be the ASCII value for each character in the original string.
We have to cast each char as an int, but the original message is a String. So I really have no clue what to do.
I understand the concept of arrays but **** me if I can use them!
I've probably not explained that too well, but like I say I don't know whether its kosher to show the whole question.