Home » java » Java StringTokenizer nextElement() Method

Java StringTokenizer nextElement() Method

This method returns next token from stringTokenizer object this method work same as nextToken() only the return type of this method is object instead of String

Signature

public Object nextElement()

Parameters

NA

Return

Return next token from StringTokenizer object

Throws

NoSuchElementException – If there is no token in StringTokenizer object then it throw this exception

Example

Another Example

Managed by MochaHost - Fast & Easy WordPress Hosting