import javax.swing.JOptionPane;
public class Indexof {
public static void main(String[] args) {
String newSentance = "";
String sentance = JOptionPane.showInputDialog("Enter sentance");
String vowels = "AEIOU";
int len = sentance.length();
for (int i = 0; i >=len; i++)
{
if(vowels.indexOf(sentance.toUpperCase().charAt(i))>0)
{
newSentance+=sentance.charAt(i);
}
}
System.out.println(newSentance);
}
}
NetBeans でエラーが発生していませんが、newSentance を印刷しても何も返されません。
他に何がありますか?