why it's wrong
import javax.swing.*;
public class A{
public static void main(String agrs[]){
String input;
//String newinput = " ";
boolean yes = true;
while(yes){
input = JOptionPane.showInputDialog("Enter a word, please");
for(int i = 0; i<input.length(); i++)
{
if("AEIOUaeiou".indexOf(input.charAt(i)) > -1)
input = input.substring(0,i) + "*" +input.substring(i+1);
}
System.out.println(input);
String choose = JOptionPane.showInputDialog("You wanna play again, 1 or 2");
char y;
if(choose.equals(""+y))
yes=false;
}
}
}
why it tells me that
H:\A.java:26: variable y might not have been initialized
if(choose.equals(""+y))
^
1 error
Tool completed with exit code 1