I have a file and I want to find pairs of characters like "hello how are you" and the answer would be [he,el,ll,lo,oh,ho,ow,wa,ar,re,ey,yo,ou], I tried the following but it does not work. I also want them to be unique but I will probably find that if I find the pairs.
P.S: the "result" is the file I am doing the program on
int[][] pairs = new int[result.length()][];
for (int i = 0; i < result.length(); i++)
{
for (int j = 0; j < result.length(); j++)
{
pairs[i][j] = j + 1;
System.out.println(pairs[i][j]);
}
}
