Stack boxes (questions / Tetris)

How to stack the boxes with class function,and use array to create 5 boxes

Gonna have to elaborate there. Its unclear what you are looking for.

i want to stack boxes , when box down to floor , another box down , and can put on it

Do you mean a la tetris style?

oh ! ur right ,do you have example?

https://discourse.processing.org/search?q=tetris