ans = JOptionPane.showInputDialog(null,"There are currently "+clubSize+" people inside right now" +
"\nHow many People are in your party today.");
int partyIn;
try
{
partyIn = Integer.parseInt(ans);
}
catch (NumberFormatException e)
{
JOptionPane.showMessageDialog(null, "What you entered was not a number: " + ans);
}
if (clubSize + partyIn <= 125)
{
clubSize = clubSize + partyIn;
peopleIn = peopleIn + partyIn;
}
else
{
JOptionPane.showMessageDialog(null, "Sorry you have to many people in your party");
}
これはエラーで返されます: 変数 partyIn が初期化されていない可能性があります