I'm trying to get the character and string from the user.But it gets only character and doesn't get the string.
    Scanner in=new Scanner(System.in);
    String s;
    System.out.println("Enter a string");
    char c = in.next().charAt(0); 
    System.out.println(c);
    s = in.nextLine();
    System.out.println(s);
 
     
    