Last active
April 2, 2019 18:48
-
-
Save isauravmanitripathi/52b32981547ce717bd49e4f9834f67a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.StringTokenizer; | |
| public class showToken { | |
| public static void main(String [] args) { | |
| StringTokenizer st1, st2; | |
| String quote1 = "JACK 3 -1/16"; | |
| st1 = new StringTokenizer(quote1); | |
| System.out.println("Token 1: " + st1.nextToken()); | |
| System.out.println("Token 2: " + st1.nextToken()); | |
| System.out.println("Token 3: " + st1.nextToken()); | |
| String quote2 = "NKDJ@N 32/234@/24"; | |
| st2 = new StringTokenizer(quote2, "@"); | |
| System.out.println("\nToken 1: " + st2.nextToken()); | |
| System.out.println("Token 2: " + st2.nextToken()); | |
| System.out.println("Token 3: " + st2.nextToken()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment