DOWNLOAD

Get our toolbar!

Saturday, 30 April 2011

// write a program in java using buffer reader to read the name entered through keyboard by the user.


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


OUTPUT DISPLAY





0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More