📌  相关文章
📜  android studio java catch empty Button - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:27.791000             🧑  作者: Mango

代码示例1
int guessValue;
        //Try-Catch to Catch any Kind of Error from editText
        try {
            guessValue = Integer.parseInt(editText.getText().toString());
        }catch (Exception e)
        {
            Toast.makeText(this,"Please Enter a Valid Number",Toast.LENGTH_LONG).show();
            return;
        }