Results 1 to 3 of 3
Thread: ant + java + console
Hybrid View
-
30th November 2008 20:54 #1
ant + java + console
Sunspot, ant. , 2 , . :
:Code:System.out.println("===========Main Menu========================"); System.out.println(" t - Temperature "); System.out.println(" a - Accelometer "); System.out.println(" l - Light "); System.out.println(" r - Random Number "); System.out.println(" m - Main Menu "); System.out.println(" q - quit "); System.out.println("============================================"); menu=readString(""); }
?Code:public static String readString(String text){ Scanner in = new Scanner(System.in); return in.nextLine(); }We are drowning in information, but starving for knowledge and time!
-
1st December 2008 10:41 #2Registered User
Join Date: Aug:2006
Location:
Posts: 4,052
javadoc- scanner

.. .Advances this scanner past the current line and returns the input that was skipped. This method returns the rest of the current line, excluding any line separator at the end. The position is set to the beginning of the next line.
Since this method continues to search through the input looking for a line separator, it may buffer all of the input searching for the line to skip if no line separators are present.
System.in BufferedReader
javadoc.
-
1st December 2008 15:18 #3
solar_sea, Buffered Reader, Console
We are drowning in information, but starving for knowledge and time!




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in