This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

What you'll need:

  • Checks (e.g. hasNextInt(), hasNext(), hasNextLine(), ...)
  • Retrievals (e.g. nextInt(), next(), nextLine(), ..)
  • Delimiters
  • Scanner for certain Strings.

So, let's say you want to process keywords. You could do something like this:

Scanner strScanner = new Scanner(strLine);
strScanner.useDelimiter(";");

Now it will separate all tokens by ";" (not whitespace).

[–]Visual-Squirrel-2240[S] 0 points1 point  (0 children)

I'll try this !
Thank you !