public class Calculator {
public static void main(String[] args) {
String s; // string that holds the expression
s = JOptionPane.showInputDialog("Enter a simple infix expression: ");
}
}
public static String infixToPrefix(String result){
JOptionPane.showMessageDialog(null,"Invalid character in expression: " + c);
}
hello guyz,,actually this is not my whole code,,i just shorten it because it's too long..i just want to ask if how to return to main method..If i input an invalid character,,it will automatically read the "infixToPrefix" method...how will i return to "main" if i want to "enter a simple infix expression" again???.......i hope you can help me guyz...