Java Scanner Usage getTypedValue(String question)

Here you can find the source of getTypedValue(String question)

Description

get Typed Value

License

Open Source License

Declaration

public static String getTypedValue(String question) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Scanner;

public class Main {
    private static Scanner scan = new Scanner(System.in);

    public static String getTypedValue(String question) {
        System.out.println(question);
        String msgRead = scan.nextLine();

        return msgRead;
    }/*from  ww  w  .  j av  a 2  s  .co  m*/
}

Related

  1. getReplay(String prompt)
  2. getScannerContents(final Scanner scanner)
  3. getStrings(Properties props, String key, String sep)
  4. getStrings(Scanner sc, int n)
  5. getTimeAsInt(String duration)
  6. input(String message)
  7. input(String prompt)
  8. isInteger(String s)
  9. isNumeric(String str)