You are viewing a single comment's thread. Return to all comments →
what does Scan.hasNext() exactly means??
And while in the for loop we are not comparing Scan.hasNext() ??
U shall read Scan.hasNext like this.... does "Scan" have next element ?
If it has, it returns TRUE, so while something is TRUE, keep it going. That's why you don't need any comparing.
sorry for being late,scan.hasNext() means after getting one input sacanner will wait for the next input .