Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- class yourname {
- public static void main (String[] args) throws IOException {
- // Defines the standard input stream
- BufferedReader stdin = new BufferedReader
- (new InputStreamReader(System.in));
- String name; // Creates a varible called message for input
- System.out.print ("Enter your name: ");
- System.out.flush(); // empties buffer, before you input text
- name = stdin.readLine();
- System.out.println("Your name is: " + name);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment