Java Console Read getInScanner()

Here you can find the source of getInScanner()

Description

Membaca masukan data dari keyboard (pendekatan Scanner) Pembatas adalah carriage return (enter)

License

Open Source License

Return

String Masukan data

Declaration

public static String getInScanner() 

Method Source Code

//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;
    }
}

Related

  1. getCommandArgs(String command)
  2. getUserInput()
  3. getUserInput()
  4. getUserInput(String text, int indentLevel)
  5. getUserInput(String whatever)