Input through
Keyboard
/*The following program is written in a very simple form
to show the keyboard input from the programmer which
import java.io.*; public class KeyBoardInput { public static int min( int a, int b) {
if (a <= b)
public static void main(String[] args) throws IOException { int x;
String sb;
BufferedReader bk = new BufferedReader (
System.out.println ("Enter x "); sb = bk.readLine();
System.out.println("Enter y"); ks = bk.readLine();
bk.close();
System.out.print("The returned value is = ");
Thanks to Khaled Mahmud Shams for submitting the above Java program example.
Related:
Java Certification, Programming, JavaBean and Object Oriented Reference Books Return to : Java Programming Hints and Tips All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|