JAVA 提示找不到符号,怎么解决,高手指点下。。。
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {// TODO add your handling code here:
string idStr=id.getText().trim();
string nameStr=name.getText().trim();
string sex=null;
if(boy.isSelected())
{
sex="男";
}
else
{
sex="女";
}
if(idStr.length()>4&&nameStr.length()>1&&sex!=null)
{
message.setText("学生登记("+nameStr+")成功!");
freeData();
}
else
{
message.setText("登记失败,请重新输入数据!");
}
}
private void freeData()
{
id.setText("");
name.setText("");
boy.setSelected(true);
girl.setSelected(false);
}