Java examples for Language Basics:Console
get Console Input
//package com.java2s; import java.util.Scanner; public class Main { public static void main(String[] argv) throws Exception { System.out.println(getConsoleInput()); }// ww w . j a v a 2s . c o m public static String getConsoleInput() { Scanner scanner = new Scanner(System.in); return scanner.nextLine(); } }