Java-CountTokens and HasMoreToken

countTokens The countTokens() method determines the number of tokens left to be parsed and returns the result. hasMoreToken TheĀ hasMoreToken() method returns true if one or more tokens remain in the string and returns false if there are none. Program Program Source import java.util.StringTokenizer; public class Javaapp { public static void main(String[] args) { String studentdata … Read more…