java - Division of String -
i want know how divide string , seperate 2 variables, 1 char , other integer example: if "c 365" string char variable 'c' , integer variable 365
the char
can extracted charat
. int
, use substring take string third character (the first char
, second space), , parse it:
string str = "c 365"; char ch = str.charat(0); int = integer.parseint(str.substring(2));
Comments
Post a Comment