Help me in solving CV problem

My issue

i am writing this code in java but i am getting a run time error
could you please check my code

My code

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner s=new Scanner(System.in);
		int t=s.nextInt();
		for(int i=0;i<t;i++)
		{
		    int n=s.nextInt();
		    String str=s.next();
		    int c=0;
		    for(int j=0;j<n;j++)
		    {
		        if(str.charAt(j)!='a'||str.charAt(j)!='e'||str.charAt(j)!='i'||str.charAt(j)!='o'||str.charAt(j)!='u')
		        {
		            for(int x=i+1;j<n;j++)
		            {
		                if(str.charAt(x)=='a'||str.charAt(x)!='e'||str.charAt(x)=='i'||str.charAt(x)=='o'||str.charAt(x)=='u')
		                {
		                    c++;
		                }
		            }
		        }
		    }
		    System.out.println(c);
		}
	}
}

Problem Link: CV Problem - CodeChef

@likhithasree04
In the x loop u have done j<n and j++ it should be x<n and x++.