I am getting an array out of index error 26 pls I really need help.
import java.util.*;
import java.util.Random;
import java.lang.*;
public class testing1
{
public static void main(String[] args)
{
String pass = new String("ENTER THE HAMLET HAM TO BE OR NOT TO BE THAT IS THE QUESTION WHETHER TIS NOBLER IN THE MIND TO SUFFER THE SLINGS AND ARROWS OF OUTRAGEOUS FORTUNE OR TO TAKE ARMS AGAINST A SEA OF TROUBLES AND BY OPPOSING END");
int[] passnum = new int[pass.length()];
for(int i=0; i<pass.length(); i++)
{
if(pass.charAt(i)>64 && pass.charAt(i)<91){
passnum[i] = pass.charAt(i)-65;}
else{
passnum[i] = 26;}
//System.out.println(passnum[i]);
}
int table[][] = new int [26][26];
for(int row=0; row<table.length; row++){
for(int column=0; column<table[row].length; column++){
table[row][column] = 0;
System.out.print(table[row][column]+"\t");
}
System.out.println();
}
for(int i=0; i<passnum.length-2; i++){
table[passnum[i]][passnum[i++]]++;}