You are viewing a single comment's thread. Return to all comments →
problem says to read array element from Line- 4 (size) 1 2 3 4 ( array elements are all in one line)
but in your code you are reading it like
4 (size) 1 2 3 4
need to use scanner.nextLine()
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays - DS
You are viewing a single comment's thread. Return to all comments →
problem says to read array element from Line- 4 (size) 1 2 3 4 ( array elements are all in one line)
but in your code you are reading it like
4 (size) 1 2 3 4
need to use scanner.nextLine()