• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps String Manupilation

coder05

Lurker
Hi,
Is there anyway to change this string to int[] arr, passing all the values from str to int[] arr.

String str = "12, 16, 18, 19";

to

int[] arr = new int[]{12,16,18,19};
thanks
 
"Change" is an odd way to describe the process! The old way of explaining it would be to tokenise it. Search for a StringTokenizer example...
 
Back
Top Bottom