I am writing a program involving ArrayList.
The program is about editing the ArrayList
through user input:
ArrayList<Type> array = new ArrayList<Type>();
switch (verify)
{
case 1:
//A list of statement including variables, conditionals and loops
break;
case 2:
//Another list of statement here includes variables, loops etc
break;
default:
do something else;
}
My question is that I don't want to put a lot of statement in a single case, is it possible for me to separate them and redirect the Java to read blocks of statement from somewhere else?