if character matches from String, 3 character should print
Given a string ss, write a code that finds and prints all its 3-character long fragments that start by character x.
For example, if ss= xarxatxm, the printed answer should be xar and xat. Hint: use methods charAt(N) and substring (N,
N+M) for String //class.

    public class exam3
    {
        public static void main(String[]args)
        {
            String[] ss = {"xarxatxm"};
            
            for(int i = 0; i<ss.length; i++)
            {
                if (ss[i]=="x")
                System.out.println(ss[i]);
            }
        }
    }
if character matches from String, 3 character should print
===

Given a string ss, write a code that finds and prints all its 3-character long fragments that start by character x.
For example, if ss= xarxatxm, the printed answer should be xar and xat. Hint: use methods charAt(N) and substring (N,
N+M) for String //class.

    public class exam3
    {
        public static void main(String[]args)
        {
            String[] ss = {"xarxatxm"};
            
            for(int i = 0; i<ss.length; i++)
            {
                if (ss[i]=="x")
                System.out.println(ss[i]);
            }
        }
    }