Why do i need to find the id of buttons while putting in array?

As described in the video, while initialising the
2D array, we just need to put the id’s of buttons as values in the array, but when I do so it shows an error so I have to use:
findViewById(R.id.button)
which works fine
What needs to be done in this case?