Anyone know what wrong with this Java code?

 public void clickFunction(View view, String tag) {

        EditText nameEditiText = (EditText)findViewById(R.id.nameEditText);

        i("Info", "It worked!!");

        int i1 = i(tag; nameEditiText.getText().toString(), getString(R.string.Values);

        EditText passwordEditText = (EditText)findViewById(R.id.passwordEditText);

        int i = i1;

                String = getString(R.string.passwordEditText).toString();

    }

Trying get button to display username and another to display password in andriod studio creating an app.

1 Answer

Relevance
  • 2 months ago
    Favorite Answer

    Lots of unknown. I'm assuming the functions used are valid.

    1. You have a function called "i" then declare an integer named "i".

    In this statement:

    int i1 = i(tag; nameEditiText.getText().toString(), getString(R.string.Values);

    2. Semicolon after tag needs to be comma

    3. Missing parenthesis at end of function

    4. nameEditiText is misspelled (at least to how it is called later in code). Unless that is the actual name of function

    I'm assuming the i function can take different quantities of string. You call it with 2 strings and then with 3. Not an issue if it does.

Still have questions? Get your answers by asking now.