Search

// 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





Share this article :
 

Post a Comment

 
Support : everytricks4.blogspot.in/ | Johny Template | Mas Template
Copyright © 2011. Computer Tricks - All Rights Reserved
Creating Website Published by
Proudly powered by Blogger