eclipse提示Syntax error on tokens, delete these tokens和Syntax error, insert ";" to complete
答案:1 悬赏:30 手机版
解决时间 2021-11-16 19:20
- 提问者网友:王者佥
- 2021-11-15 21:18
eclipse提示Syntax error on tokens, delete these tokens和Syntax error, insert ";" to complete S错误
最佳答案
- 五星知识达人网友:雾月
- 2021-11-15 22:38
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前面没有加; 这个错误一般都是标点符号的问题
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前面没有加; 这个错误一般都是标点符号的问题
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯