Doubt in 2D array code

Can u please explain the code at line no 18 and 19 .

Hey @rahul1402 Line no. 18 is printing in the console for user to enter no. of cols for a particular row in Array and line no. 19 is taking that input from user and since this input will be no. of Columns in that tow therefore line no. 20 we get current by arr[row] and in this slot we put a 1D array size cols by using arr[row] = new int[cols];(Recall the fact 2D array is array of Arrays).

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.