case 7 :
scan.nextLine();
System.out.println("Ievadiet reisa sākuma staciju");
k = scan.nextLine();
System.out.println("Ievadiet reisa gala staciju");
v = scan.nextLine();
for(i=0; i<50; i++){
for(j=0; j<5; j++){
if(A[i][0].equals(k) && A[i][1].equals(v) && A[i][j]!=null)
System.out.println("Biļetes cena:"+A[i][4]);
}
if(A[i][j-1]!=null)
System.out.println();
}
break;
I can't find a solution for my problem. I need to print on screen the lines with asked text content. Everything works but in the end it shows this error. Can anybody help?