import java.io.*; //include Java's standard Input and Output routines
class Echo {
public static void main (String[] args) throws IOException {
// Defines the standard input stream
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
String message; // Creates a varible called message for input
System.out.print ("Enter the message : ");
System.out.flush(); // empties buffer, before you input text
message = stdin.readLine();
System.out.print("You ");
System.out.println("entered : " + message);
} // method main
} // end of class Echo
Tuesday, 23 January 2018
Related Posts:
ABC class in javapublic class ABC{//public int a; public int b; public int c;&nbs… Read More
Candy bar example in java import java.io.*;//import javax.swing.*;class Candy { public sta… Read More
Min of three number in javapublic class MainClass { public static void main(String args[]) … Read More
Area in java import javax.swing.*;public class Area { // Constant PI is defin… Read More
0 comments: