I am trying to make a program which converts English to Pig-Latin but when I click on Y to confirm that I want to reset it doesn't work. There seems to be an error at line 15 according to eclipse. Could you please give me a fix and the code for it?, Thanks

import java.util.Scanner;

public class PigLatinConvertor {
public static void main (String args[]){
boolean start = true;
while(start){
Scanner input = new Scanner(System.in);

System.out.print("Enter any word: ");

String word = "a";

String letter = "y";

word = input.next();

int length = word.length();

char vowel = word.charAt(0);

if(vowel=='a'||vowel=='A'||vowel=='e'||vowel=='E'||vowel=='i'||vowel=='I'||vowel=='o'||vowel=='O'||vowel=='u'||vowel=='U'){
System.out.println(word + "way");
System.exit(0);
}
else{
int i = 0;
for (i = 0; i < word.length(); i++){
if (word.charAt(i)=='a' || word.charAt(i)=='e' ||
word.charAt(i)=='i' || word.charAt(i)=='o' ||
word.charAt(i)=='u' || word.charAt(i)=='y'){
break;
}
}
int j = i;
if (word.contains(letter)){
if (j == 0){
String word5 = word.substring(0, j + 1);
String word6 = word.substring(j + 1, length);
System.out.println(word6 + word5 + "ay");
}
else{
String word7 = word.substring(0, j);
String word8 = word.substring(j, length);
System.out.println(word8 + word7 + "ay");
}
}
else{
String word3 = word.substring(0, j);
String word4 = word.substring(j, length);
System.out.println(word4 + word3 + "ay");
}
}
System.out.println("Do you want to continue? [Y/N]");
String s = input.next();
char restart = s.charAt(0);
if(restart != 'Y') start = false;
input.close();
}
}
}