import javax.swing.JOptionPane;
public class $ {
public static void main(String[] args) {
String answer = JOptionPane.showInputDialog("请您回答(是/否)");
if ("是".equals(answer)) {
// do some thing for a
System.out.println("a");
} else if ("否".equals(answer)) {
// do some thing for b
System.out.println("b");
} else {
System.out.println("输入错误");
}
}
}