public static String s1 = "team A won the match historically to clinch series which made surprise around the world ";
public static String s2 = "He did his part";
t1=s1.length();
t2=s2.length();
t3=Math.abs(t1-t2);
for(i=0;i<t3;i++)
{
Sub_string.add(s1.substring(i,t2++));
}
How can I solve this?
tried it. doesn’t seem to throw an exception
I guess you defined your list to have max size? if you define it like this it will work.