A program which read data from keyboard

import java.io.*;
class hellstr
{
public static void main (String args[]) throws IOException
{
InputStreamReader reader = new InputStreamReader(System.in);
BufferedReader input = new BufferedReader(reader);
System.out.println(“Enter your name”);
String name = input.readLine();
System.out.println(“Hello, “+name+ “!”);
}
}

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.