Character type runtime error

@Amogh_Agarwal In the input you are taking you just need to take string s as an input. SO remove int t as an input just take a single string as an input. There will be only one case not multiple. Read Input Format Carefully.

can you please resolve my error so that i can under stand more clearly,

@Amogh_Agarwal Here is the modified code!!

import java.util.*;
public class Main {
    public static void main(String args[]) {
		Scanner sc=new Scanner(System.in);
		String s1,s2,s3="";

		for(int j=0;j<t;j++)
		{
			s1=sc.nextLine();
			s2=sc.nextLine();
			for(int i=0;i<s1.length();i++)
			{
				if(s1.charAt(i)==s2.charAt(i))
				s3+=s1.charAt(i);
				else
				s3="";
			}
		}
		System.out.println(s3);

    }
}

can you please explain why you have removed t=sc.nextInt(); from code.

while using this code it is accepted but not marked as complete

@Amogh_Agarwal I have removed t = sc.nextInt() Bcoz it is not in input format you don’t need t and it will not be provided in input. and your question may not be marked completed if you have opened editorial.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

the code you has send is not working

@Amogh_Agarwal which question you are talking about ?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.