hello guys im tryingg to write a program which will generate an aeiou grid...if the program finds two consecutive vovels in a sentence then it will thake the first vowel as the row and second one as the column reference ...and do a +1 in that location i seem to have written the program but it is not doing a plus one at any possition .... can u pls help me debug heere is the my code
import java.io.*;
class aeiou
{
public static void main()throws IOException
{
InputStreamReader isr=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
System.out.println("input a string");
String str =br.readLine();
int a=0,e=1,i=2,o=3,u=4;
int l=str.length();
int arr[][]=new int[5][5];
for(int j=0;j<l-1;j++)
{
if(str.charAt(i)=='a'||str.charAt(i)=='e'||str.charAt(i)=='i'||str.charAt(i)=='o'||str.charAt(i)=='u')
if(str.charAt(i+1)=='a'||str.charAt(i+1)=='e'||str.charAt(i+1)=='i'||str.charAt(i+1)=='o'||str.charAt(i+1)=='u')
{
if(str.charAt(i)=='a'&&str.charAt(i+1)=='a')
arr[a][a]++;if(str.charAt(i)=='a'&&str.charAt(i+1)=='e')
arr[a][e]++;if(str.charAt(i)=='a'&&str.charAt(i+1)=='i')
arr[a][i]++;if(str.charAt(i)=='a'&&str.charAt(i+1)=='o')
arr[a][o]++;if(str.charAt(i)=='a'&&str.charAt(i+1)=='u')
arr[a][u]++;if(str.charAt(i)=='a'&&str.charAt(i+1)=='a')
arr[e][a]++;if(str.charAt(i)=='e'&&str.charAt(i+1)=='e')
arr[e][e]++;if(str.charAt(i)=='e'&&str.charAt(i+1)=='i')
arr[e][i]++;if(str.charAt(i)=='e'&&str.charAt(i+1)=='o')
arr[e][o]++;if(str.charAt(i)=='e'&&str.charAt(i+1)=='u')
arr[e][u]++;if(str.charAt(i)=='e'&&str.charAt(i+1)=='a')
arr[i][a]++;if(str.charAt(i)=='i'&&str.charAt(i+1)=='e')
arr[i][e]++;if(str.charAt(i)=='i'&&str.charAt(i+1)=='i')
arr[i][i]++;if(str.charAt(i)=='i'&&str.charAt(i+1)=='o')
arr[i][o]++;if(str.charAt(i)=='i'&&str.charAt(i+1)=='u')
arr[i][u]++;if(str.charAt(i)=='i'&&str.charAt(i+1)=='a')
arr[o][a]++;if(str.charAt(i)=='o'&&str.charAt(i+1)=='e')
arr[o][e]++;if(str.charAt(i)=='o'&&str.charAt(i+1)=='i')
arr[o][i]++;if(str.charAt(i)=='o'&&str.charAt(i+1)=='o')
arr[o][o]++;if(str.charAt(i)=='o'&&str.charAt(i+1)=='u')
arr[o][u]++;if(str.charAt(i)=='o'&&str.charAt(i+1)=='a')
arr[u][a]++;if(str.charAt(i)=='u'&&str.charAt(i+1)=='e')
arr[u][e]++;if(str.charAt(i)=='u'&&str.charAt(i+1)=='i')
arr[u][i]++;if(str.charAt(i)=='u'&&str.charAt(i+1)=='o')
arr[u][o]++;if(str.charAt(i)=='u'&&str.charAt(i+1)=='u')
arr[u][u]++;
}
}
for(int j=0;j<5;j++)
{
for(int q=0;q<5;q++)
{
System.out.print(arr[j][q]);
}
System.out.println();
}
}
}
if you have any better suggestions then please suggest me some