The Java Programming language - The language itself plus JSP, Servlets, Enterpise, Beans, etc Re: Inputting two dimensional array from command p Posted by anonymous (anonymous), 24 November 2005I`m asking the user to enter the 4 co-ordinates of rectangle for an array..............Also how do i get the float values from user..... Here is the code............ BufferedReader standard = new BufferedReader( new InputStreamReader(System.in)); try { System.out.println("Enter the co-ordinates for people"); String inline = standard.readLine(); while((standard.readLine()) != null) { int var = Integer.parseInt(inline); StringTokenizer strtok = new StringTokenizer (inline," "); while (inline.hasMoreTokens()) { arr[0][0]=var; arr[0][1]=var; arr[1][0]=var; arr[1][1]=var; } b = Integer.parseInt(inline); c = Integer.parseInt(inline); d = Integer.parseInt(inline); } } catch (Exception e) { ; } This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
Home Printer friendly Accessibility
Large font Regular font Small font Blue on yellow Yellow on blue Black on White Green on Black Customise About Accessibility |
||||
| |||||
| |||||
WELL HOUSE CONSULTANTS LTD • 404, The Spa • Melksham, Wiltshire SN12 6QL • United
Kingdom PHONE: 01144 1225 708225 FACSIMILE 01144 1225 793803 EMAIL: info@wellho.net You are currently on our United States site. Change your country. Privacy and Copyright Statement • Terms and Conditions Updated Saturday, April 27th 2024 • © Well House Consultants, 2024 This is page http://www.wellho.net/forum/The-Java-Programming-language/Re-Inputting-two-dimensional-array-from-command-p.html |