0

What do we call the thing inside the parenthesis i.e., "new AdpaterView"

spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { switch (position) { case 0: constraintLayout.setBackgroundColor(Color.parseColor("#0091EA")); break; case 1: constraintLayout.setBackgroundColor(Color.parseColor("#5CF89D")); break; case 2: constraintLayout.setBackgroundColor(Color.parseColor("#FFEC87")); break; case 3: constraintLayout.setBackgroundColor(Color.parseColor("#F9A86C")); break; case 4: constraintLayout.setBackgroundColor(Color.parseColor("#C39AFC")); ... https://code.sololearn.com/cBRg0hUDmrFE/?ref=app

5th Jul 2022, 11:22 AM
Abhay
Abhay - avatar
1 Antwort
0
The stuff in parenthesis in calls to functions or methods is called the arguments. If you refer to "new <Class name>" part, it's a call to a class constructor, or an object instantiation.
5th Jul 2022, 11:27 AM
Emerson Prado
Emerson Prado - avatar