
EditText is overlaid on TextView configures itself to be edited.
It allows users to enter text, email, numbers, passwords, and more ..
The syntax is:
EditText et = (EditText) findViewById(R.id.mText);

Getting text:
To get the text from EditText, please use the following code.
String strg = et.getText().toString();
On Android, EditText is the standard entry widget in android application. We often use EditText in our application to provide input or text, especially in the form.
The simplest example of EditText is Login or Sign-in form.
EditText anyField = (EditText) findViewById(R.id.EditText1);
Very important note:
Taking the / Getting Value From EditText Classroom Java: An example of the EditText where we take the values of EditText in Java classes:
EditText myEditText = (EditText) findViewById(R.id.simpleText);
String editValue = myEditText.getText().toString();
Source: Master Android (App)