from this code:
private void Splitter(){
//Use split method to put the String into String array separated with " " delimeter
String inputString = inputsjTextField.getText();
String[] stringParts = inputString.split(" ");
//Convert String array to int array
int[] inputs = new int[stringParts.length];
for (int i=0; i < stringParts.length; i++) {
inputs[i] = Integer.parseInt(stringParts[i]);
//System.out.println(inputs[i]);
}
}
private void getPivot(){
}
Since i will use splitter on future parts of every sorting algorithm i will do. i decided to have it in one function. So the problem now, is how can i get the values of inputs[i] and put it on any variable in function getPivot.
This post has been edited by smohd: 14 August 2012 - 11:47 AM
Reason for edit:: Code tags added. Please use [code] tags when posting codes

New Topic/Question
Reply



MultiQuote




|