public class DialogBox {
public static void main (String arg[]) {
String inputCourseCode;
inputCourseCode = this.inputCourseCode();
}
public String inputCourseCode() {
String input = JOptionPane.showInputDialog("Input the course code of this course:");
return input;
}
}
如何在主函數中調用方法inputCourseCode
?在java中調用方法