eclipse提示Syntax error on tokens, delete these tokens和Syntax error, insert ";" to complete S错误
发布网友
发布时间:2022-10-13 23:13
我来回答
共1个回答
热心网友
时间:2023-11-17 20:57
Button registerButton=(Button)findViewById(R.id.button1);
registerButton.setOnClickListener(new View.OnClickListener(){
String password=passwordEditText.getText().toString();
String confirm=confirmEditText.getText().toString();
if(password.equals("")){
DisplayToast("Password can not be null");
return;
}
if(!password.equals(confirm)){
DisplayToast("the password are inconsistent");
return;
}
});String email=emailEditText.getText().toString();
SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd",Locale.CHINA);
String dateString=dateFormat.format(mcalendar.getTime());
String sql="INSERT INTO user_info(name,password,email,birthday)VALUES('"+userName+"','"
+password+"','"+email+"','"+dateString+"')";
mDb.exeSQL(sql);
}
String email前面没有加; 这个错误一般都是标点符号的问题