Creating console command list - how to do it right with Java
问题 For a homework I code in Java(with which I'm a newbie), I bump into the problem of creating a console command list. The user will be confronted with a set of commands, among which s/he will choose his/her choice with a number. Something like this: Enter your choice: 0) Create a Table 1) List All Tables 2) Delete a Table 3) Insert a Record 4) List All Records 5) Delete a Record 6) Find a Record(by =) 7) Find a Record(by >) 8) Find a Record(by <) 9) Exit The first way I have done it is as