View RSS Feed

My Java Tips

  1. KeyBoard Input Class

    by , 11-08-2011 at 07:39 PM (My Java Tips)
    Taking input from keyboard involves various steps. Lot of people ask for some ready made class which will serve the purpose. Following class is a good choice. You can use "readInt()", "readDouble()", "readChar()" and "readString()" methods according to your needs.




    Java Code:
    import java.io.*;
    
    public class KeyboardInput {
    
    	static BufferedReader stdin =
    		new BufferedReader( new InputStreamReader(System.in));
    ...
    Categories
    Java SE