I can sequentially retrieve the following list of elements in Java and I need to insert them in an AxB dimension matrix. How can I put these elements in their order to the matrix?
Element: rainy
Element: hot
Element: high
Element: false
Element: No
Element: rainy
Element: cold
Element: normal
Element: true
Element: yes
My desired output is this:
array = [[rainy, hot, high, false, No],[rainy, cold, normal, true, yes]]
How to begin?