File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
Java in General
next vs hasnext() in Scanner
Joined: Feb 27, 2002
Dec 18, 2004 02:43:00
I am confused between hasnext and next methods in the
class. Please help.
Joined: Dec 03, 2004
Dec 18, 2004 03:21:00
what is the confusion Pradeep?
is it the use of them that's confusing you? Well, hasNext is used to find out whether another token is available, whereas, next is used to get that 'next' token!
hope this helps.
rocket mass heater
subject: next vs hasnext() in Scanner
Why is this hashmap iterating through an infinite loop?
How to iterate a Set (2 steps once)
Iterator in TestNG class
A kinder, gentler API for reading lines
Reading Elements from an ArrayList, 3 at a time
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014