i have a problem in my code when i go to the method add i successfully go there but i cant go back to the main method someone who can help about this.
sorry for my bad english.
here is the code:
package project;
import java.util.*;
import java.lang.String;
/**
*
* @author students
*/
public class Main {
private static int status;
private static char yn;
private static char more;
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Enter Choice");
System.out.println("1: Add");
System.out.println("2: Delete");
System.out.println("3: Edit");
System.out.println("4: Exit");
System.out.println("");
Scanner sc=new Scanner(System.in);
int choice=sc.nextInt();
switch (choice)
{
case 1:
Add();
break;
case 2:
Delete();
break;
case 3:
Edit();
break;
case 4:
Exit();
break;
}
}
// add item
private static void Add() {
int counter=0;
int[] array;
array=new int[counter];
Scanner sc=new Scanner(System.in);
System.out.println("Name: ");
String name=sc.next();
System.out.println("Add.: ");
String add=sc.next();
sc.close();
}
// delete item
private static void Delete() {
throw new UnsupportedOperationException("Not yet implemented");
}
//edit item
private static void Edit() {
throw new UnsupportedOperationException("Not yet implemented");
}
//exit
private static void Exit() {
System.exit(status);
}
}