Results 1 to 2 of 2
Thread: a no such element exception
- 08-07-2007, 05:30 PM #1
Member
- Join Date
- Aug 2007
- Posts
- 1
- Rep Power
- 0
- 08-07-2007, 05:36 PM #2
Senior Member
- Join Date
- Mar 2007
- Posts
- 134
- Rep Power
- 0
Can You please eloborate the situation ?
In the Java Doc of Enumeration Class it says
So If you call nextElement without checking hasmoreElements you will get this exception Avoid this you will get the problem outJava Code:nextElement public Object nextElement() Returns the next element of this enumeration if this enumeration object has at least one more element to provide. Returns: the next element of this enumeration. Throws: NoSuchElementException - if no more elements exist.
Similar Threads
-
How to use Idref Element and its advantages
By Java Tip in forum Java TipReplies: 0Last Post: 03-30-2008, 10:04 AM -
Trouble with factory method - unhandled exception type Exception
By desmond5 in forum New To JavaReplies: 1Last Post: 03-08-2008, 06:41 PM -
Unique element in an array
By revathi17 in forum New To JavaReplies: 2Last Post: 12-31-2007, 08:44 AM -
Max element in an Array
By mew in forum New To JavaReplies: 5Last Post: 12-03-2007, 05:26 PM -
selectSingleNode not returning element...
By schu777 in forum XMLReplies: 4Last Post: 07-31-2007, 05:19 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks