My program terminates after taking one string input. It doesn't take string 2 input.
Here is the snippet of code:
public static void main (String[] args) {
Scanner scn= new Scanner(System.in);
int T ;
T=scn.nextInt();
while(T!=0){
String s1 = scn.nextLine(); // after i give input for the first string ,program terminates!
String s2 = scn.nextLine(); // program terminates before asking for s2 input
System.out.println(isMetaString(s1,s2));
T--;
}
}