Skip to content

Commit 32054fe

Browse files
authored
Code Mistake Resolved in StringTokenizer Class
1 parent afcac6d commit 32054fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

str1_tkn.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ public static void main(String[] a){
3838
// 3. nextToken() : Returns the next Token from the given String Tokenizer Class
3939
// Above method is already been implement together with the hasMoreTokens() in the while Loop
4040

41-
// 4. hasMoreElement() : Works similar to the hasMoreToken() method.
41+
// 4. hasMoreElements() : Works similar to the hasMoreToken() method.
4242
StringTokenizer str4 = new StringTokenizer("This is not a good one !"," ");
4343
while(str4.hasMoreElements())
4444
System.out.println(str4.nextElement());
4545

4646
// 5. nextElement() : It is used in order to point out and return the next element or partition of the String
4747
// And this method works similar to the nextToken() method, together with its example is been given above.
4848
}
49-
}
49+
}

0 commit comments

Comments
 (0)