This is a simple test I made for my user input of my program but it skips over the second user input part. I am using sc.nextLine()
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int option;
String name;
System.out.println("1 or 2");
option = sc.nextInt();
if(option == 1)
{
System.out.println("Please enter a name");
name = sc.nextLine();
System.out.println(name);
}
}