You can't declare your functions there, and you don't call them anyway!
What you need to do is several things:
1) Declare the methods outside the main function
2) Make them
static
so they can be called from
main
- a static method - without needing a class instance.
3) Call them in your
switch
block:
public static void main(String[] args) {
...
switch (mainCH) {
case 1:
display();
break;
case 2:
update();
break;
...
}
...
}
public static void display() {
...
}
public static void update() {
...
}