Can I make that code shorter? : as in title. Im new in android programing/development and have just basic knowledge of Java but many years in different languages such as PHP, JavaScript and some c#.. Im just wondering can I make this code shorter like into one line? Without making another variable called "test" just for test purposes.. and then use that one variable for whatever I would like to such as auth system.

    public void signIn(View view) {

        EditText username = (EditText) findViewById(R.id.usernameField);
        String test = username.getText().toString();

        Toast.makeText(MainActivity.this, test, Toast.LENGTH_SHORT).show();

    }