1

method definition passed as argument

view story
linux-howto

http://stackoverflow.com – I'saw this code when looking at an Android example: EditText editNumber; Button btnCall = (Button) this.findViewById( R.id.btnCall); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); editNumber = (EditText) this.findViewById(R.id.editNumber); btnCall.setOnClickListener( new OnClickListener() { public void onClick(View v) { call(); } } ); } Here new OnClickListener() { public void onClick(View v) { call(); } } (HowTos)