Possible Duplicate:
Java Pass Method as Parameter
Is it possible to pass a method as a parameter in Java? If I can't what would be the best course of action for the method below without having to repeat code.
public void enterUserInput(javax.swing.JTextField inputField, javax.swing.JTextField   outputField, method rangeChecking){
    String input;
    double output;
    input = inputField.getText();
    output = Double.parseDouble(input);
    if(rangeChecking(output)){
        outputField.setText(input);
        inputField.setText(null);
    }
I will be calling a rangeChecking method from a different class and each time I call the enterUserInput the rangeChecking method will be different
 
     
     
     
     
     
     
     
     
     
     
    