Java Scanner Usage getNextWord(Scanner scan)

Here you can find the source of getNextWord(Scanner scan)

Description

get Next Word

License

Apache License

Declaration

public static String getNextWord(Scanner scan) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Scanner;

public class Main {
    public static String getNextWord(Scanner scan) {
        String word = scan.nextLine();
        return word.trim();
    }//w  ww . ja v a 2s .c om
}

Related

  1. getLineStartingWith(Scanner scanner, String starts)
  2. getLngIn()
  3. getNextInput(Scanner scan)
  4. getNextLine(final Scanner scanner)
  5. getNextLine(final Scanner source)
  6. getNextWord(String str, int index, StringBuilder outToken, String ignoreRegex)
  7. getNumberOfUsernames(String usernames)
  8. getOutputFromValgrindOutput(String valgrindOutput)
  9. getPartOfString(String string, int index, String delimiter)