Here is the code, this is my test class.
import java.util.Scanner;
public class PractiseTest {
public static void main(String[] args) {
Scanner kb = new Scanner(System.in);
Arrays ma = new Arrays(); // calls class
String[]name = new String[6];
int choice;
System.out.println("Enter choice: ");
choice = kb.nextInt();
switch(choice)
{
case 1:
{
ma.inputData(name); // calls method
}
break;
case 2:
{
ma.displayData(name);
}
break;
}
}
}
Sample output(does nothing):
Enter choice:
1
BUILD SUCCESSFUL (total time: 4 seconds)

New Topic/Question
Reply



MultiQuote




|