Skip to content

Instantly share code, notes, and snippets.

@TheBeachMaster
Created February 17, 2015 06:09
Show Gist options
  • Save TheBeachMaster/b9d827245618f00f0f3f to your computer and use it in GitHub Desktop.
Save TheBeachMaster/b9d827245618f00f0f3f to your computer and use it in GitHub Desktop.
Input Stream Reader
package com.demo.input;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
// write your code here
String line;
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter a string of characters");
line=stdin.readLine();
System.out.println("This is what you entered: "+line);
System.exit(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment