public String getResult(){ String s2 = JOptionPane.showMessageDialog(null," is higher than Magic Number"); return s2; }
I am trying to return the String value to getResult() method, but it doesn't work.
The Imcompatible type error keeps occurring. It states that the return value is void, but didn't I return variable s2 which is a String variable ?
