Thank you in advanced for your help. I am still a beginner java student and I realize there are similar questions, but none specifically answer the question at my level. Essentially a user inputs a long number that requires I treat it like a string, and then turn it into an array. The assignment specifically states, "The .parseInt() method and the Integer class can be your friend in this assignment" I've read and searched through my textbook, scoured the internet, and have not been able to find anything helpful. How can I create an integer array from the string described above? When I call the method later I receive an error. Below is what I have so far. If you could direct me to a question I have not seen that's fine, but it would really help if someone could answer my question and correct my logic. Thanks again!
**I did turn the string into a char array, but it's not necessary. If I need to change it I can.
public int [] ctCd(char [] cardArray){
int [] creditCard = new int [cardArray.length];
for (int i=0; i <= 15; i++){
int newNum = Integer.parseInt(cardArray[i]);
creditCard [i] = newNum;
}
return creditCard;
}