Here you can find the source of getInScanner()
public static String getInScanner()
//package com.java2s; //License from project: Open Source License import java.util.Scanner; public class Main { /**/*from w ww. ja v a 2s . c o m*/ * Membaca masukan data dari keyboard (pendekatan Scanner) * Pembatas adalah carriage return (enter) * @return String Masukan data */ public static String getInScanner() { String s = ""; Scanner input = new Scanner(System.in).useDelimiter("\r"); s += input.next(); return s; } }