/ * * Created on 2005-4-5 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates * / import java.io.BufferedReader; import java.io.IOException ; import java.io.InputStreamReader; / *** @author Zhangql ** TODO to change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates * / public class EnterConsole {public static void Main (String [] args "throws oews ooException {enterconsole (); enterconsole.printconsoleChar ();} / ** * From control to receive a string, then output to the console * @throws ioException * / public void printConsoleLine () throws IOException {BufferedReader br = new BufferedReader (new InputStreamReader (System.in)); String str = null; System.out.println ( "Enter your value:"); str = br.readLine (); System. Out.println ("Your value is:" str);} / ** * receives a character * from the console * then print onto the console * @throws oExceptio N * / public void printconsolechar () throws oException {system.out.print ("Enter a char:"); char i = (char) system.in.read (); system.out.println ("Your char I: " i);}}