Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How does java say that a character is disassembled and converted into an int array?
How does java say that a character is disassembled and converted into an int array?
Hello!

The following is the written code:

Public? Class? Testing? {

Public? Static electricity Invalid? main(String[]? args)? {

//? The initial string cannot contain characters other than numbers.

String? str="3,4,5,";

//? Separate strings with commas to get an array of strings.

String[]? s? =? str.split(",");

//? Defines an int array with the same length as the string array.

int[]? Me? =? New? int[s . length];

For what? (int? n? =? 0; ? n? & lt? I. Length; ? n++)? {

//? Converts the value of the corresponding item in the string array to int type.

Me [n]? =? integer . parse int(s[n]);

system . out . println(I[n]);

}

}

}