import java.util.Scanner;
public class Main { 
    public static void main(String [] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("Enter your name");
        String n=sc.nextLine();
        System.out.println("Enter your age");
        int age=sc.nextInt();
        System.out.println("Enter your gender");
        String g=sc.nextLine();
        System.out.println("Hailing From");
        String c=sc.nextLine();
        System.out.println("Welcome, " +n+ "!");
        System.out.println("Age:" +age);
        System.out.println("Gender:" +g);
        System.out.println("City:" +c);
    }
}
The code is not taking input for gender. Don't know what's wrong in the code?
 
     
    