How does this program actually work...?
import java.util.Scanner; class string { public static void main(String a[]){ int a; String s;
Scanner's buffer full when we take a input string through scan.nextLine(); so it skips the input next time . So solution is that we can create a new object of Scanner , the name of the object can be same as previous object......