?? app.java
字號:
package com.telephonebook;
public class App {
/**定義一個變量用于控制循環
*
*/
private boolean hideMainMenu=false;
private int subMenuIndex=0;
/**
* 程序入口函數
* 主菜單的開始
* 調用主菜單
*/
public void start(){
int in=subMenuIndex;
if(!hideMainMenu)/**第一次從這里開始,以后判斷。*/
{
new Menu().mainMenu();
System.out.println("請選擇功能鍵:");
/**對用戶的輸入進行檢查*/
in=new TelNoteRegex().menuRegex(1, 6);
}
switch(in){
case 1:
/**進入添加菜單*/
hideMainMenu=new Operate().addLogic();
subMenuIndex=1;
break;
case 2:
/**進入查找菜單*/
hideMainMenu=new Operate().searchLogic();
subMenuIndex=2;
break;
case 3:
/**進入修改菜單*/
hideMainMenu=new Operate().modifyLogicLogic();
subMenuIndex=3;
break;
case 4:
/**進入刪除菜單*/
hideMainMenu=new Operate().deleteLogic();
subMenuIndex=4;
break;
case 5:
/**進入排序菜單*/
hideMainMenu=new Operate().orderLogic();
subMenuIndex=5;
break;
case 6:
/**提醒用戶退出系統*/
System.out.println("系統正在退出中……");
System.exit(0);
break;
}
start();
}
public static void main(String[] args) {
new App().start();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -