Here you can find the source of getNextInput(Scanner scan)
Parameter | Description |
---|---|
scan | Scanner corresponding to input |
public static String getNextInput(Scanner scan)
//package com.java2s; //License from project: Apache License import java.util.Scanner; public class Main { private final static String SEPARATOR = "#"; /**/*www. j a va2 s. c o m*/ * read next input string * * @param scan * Scanner corresponding to input * * @return next input string * * */ public static String getNextInput(Scanner scan) { String word = scan.nextLine(); String word2 = (word.split(SEPARATOR)[0]); return word2.trim(); } }