Hi,
I have a string str and I want to take the string and put it in the int[] xAxis array.How can I do that? The following code is not working, need help.
[HIGH]String str = 12,16,23,78;
String[] nums = str.split(",");
int[] newArr = new int[nums.length];
for(int i = 0;i < newArr.length;i++)
{
newArr = Integer.parseInt(nums);
int results = newArr;
}
int[] xAxis = new int[]{results};
[/HIGH]
I have a string str and I want to take the string and put it in the int[] xAxis array.How can I do that? The following code is not working, need help.
[HIGH]String str = 12,16,23,78;
String[] nums = str.split(",");
int[] newArr = new int[nums.length];
for(int i = 0;i < newArr.length;i++)
{
newArr = Integer.parseInt(nums);
int results = newArr;
}
int[] xAxis = new int[]{results};
[/HIGH]