The program takes the user's input which is an integer (no chars) that is > 1 and <= 99999 and calls the displayDigits() method to tear apart using division and modulus in for loop. For example, after the user enters an integer: 3456, the method should return the input value with two spaces between each digit.

// as global variables
int digit;
String output="";
String input;

public void actionPerformed( ActionEvent actionEvent ) {
input = inputField.getText();

displayDigits( input );

} // end method actionPerformed

public int displayDigits( input ) {
for( int numdigits=input.length; numdigits>=0; numdigits--) {

digit = Integer.parseInt( input )/math.pow( 10, numdigits-1 );
String digit = toString( digit );
digit = Integer.parseInt( input )%math.pow( 10, numdigits-1);

output += ""+digit+"";
} // end for loop

outputField.setText( output ); // writes output string to textbox
} // end method displayDigits

} // end class

-------------------------------------

There are 4 errors related to the displayDigits() method including the parameter. I'm not sure whats wrong... The brackets are fine. Maybe it has to do with how this method ends.. Can anyone help me out here.. I would be appreciated.