How to make user to input numbers in a specific manner like to take input in 'Matrix Form' in java? Is it possible?
Actually I wrote a program to check that whether a matrix is a 'Square Matrix ' or not. I wanted that the user must give a matrix of order 3*3 and after each input on pressing ' Enter ' cursor will leave space and then moves to take next input without changing line. When the 3rd input of first row is given ( i.e. 1,3) then on pressing 'Enter' it moves to the next line .The process should continue till 3*3 order of matrix is satisfied. On giving the last number (i.e. 3,3) and then on pressing 'Enter' it should give the output (I.e. whether a matrix is a square matrix or not). Is it possible to do so? If no, then please suggest a better alternative. Please give answer in regard for java language ( because currently I am learning java). Also provide an effective version to check 'Square Matrix'. Thank you!!!