.length() vs .getText().length() vs .getText().toString().length()
2022-09-02 12:27:32
例如,在下面的代码中,和 是相等的。a
b
c
EditText editText;
editText = (EditText) findViewById(R.id.edttxt);
editText.setText("1234");
int a, b, c;
a = editText.length();
b = editText.getText().length();
c = editText.getText().toString().length();
和 和 之间有什么区别?length()
getText().length()
getText().toString().length()