Q:

Explanation of android calculator code

I was creating a simple calculator with android. I searched the google and found this fragment of code which worked perfectly for me. But I cannot understand this fragment of the code which was implemented on the onCreate() method. Can someone please explain me this part of code?
protected void onCreate(Bundle savedInstanceState) { 
          super.onCreate(savedInstanceState); 
          setContentView(R.layout.activity_main); 

          Toast.makeText(this, "Welcome :)", Toast.LENGTH_SHORT).show(); 
          int[]Btn_Id={ R.id.Btn0, R.id.Btn1, R.id.Btn2, R.id.Btn3,R.id.Btn4, R.id.Btn5, R.id.Btn6, R.id.Btn7, R.id.Btn8, R.id.Btn9, R.id.BtnClear, R.id.BtnDecimal, R.id.BtnDivide, R.id.BtnMultiply, R.id.BtnSubtract, R.id.BtnAdd, R.id.BtnEqual }; 

           for(int i: Btn_Id) { 
               ((Button)findViewById(i)).setOnClickListener(this); 
            } 
       }

A:

int[]Btn_Id

it is a array of button which contain id of buttons  defined in layout resource file

The below code is used to set ClickListener to all Button  in your Btn_Id array

for(int i: Btn_Id) {
     ((Button)findViewById(i)).setOnClickListener(this);
}

