Different Behaviour Of Input Scanner And Parse In Android Studio And Netbeans
I am reading the same pipe-delimited file using NetBeans (to test the basic code) and Android Studio (actual application) and getting different results. Here is the offending code
Solution 1:
Looks like the problem is in using hasNext() in the header of for loop and using nextLine() in the body of for loop. When I replaced hasNext() with hasNextLine(), my record counts matched. Don't understand why, since hasNext() is supposed to look at something, not change, but it worked.
Post a Comment for "Different Behaviour Of Input Scanner And Parse In Android Studio And Netbeans"