シンプルなパスワードメーカー
Random myrand = new Random();
int x = myrand.nextInt(126);
x = x+1;
char c = (char)x;
//this gets the character version of x
for (int mycounter = 0; mycounter < 10; mycounter++)
{
x = myrand.nextInt(127);
x = x+1;
if (x == 32)
{
x = 33;
}
c = (char)x;
System.out.print(c);
}
System.out.println();
私のエラーはどこですか?
これを修正するにはどうすればよいですか?