Results 1 to 2 of 2
Thread: First time Scanner Help
- 08-12-2012, 03:37 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 29
- Rep Power
- 0
First time Scanner Help
Hey guys this is my first time using scanners and I was wondering how you would scan something from a text file that is within a nested for loop.
e.g:
I think I already understand some of the basics of scanning, e.gJava Code:for (int i=0; i <ROWS; i++) { for (int j=0; j < COLS; j++) { if (twoDArray[i][j] == null) { pW.println("null"); // how would i scan this line } else { pW.println(cards[i][j].getCardStatusInformation()); // and this line } } }
could be scanned by:Java Code:pW = new PrintWriter(fileName); pW.println(WidthOfWall);
I hope this made sense, thanks.Java Code:scan = new Scanner(fileName); WidthOfWall = scan.nextInt();
- 08-13-2012, 04:55 AM #2
Re: First time Scanner Help
Similar Threads
-
enter the time zone offset to GMT and convert to current time
By Bonia in forum New To JavaReplies: 5Last Post: 02-29-2012, 10:07 AM -
is there any way to handle ideal time session time out
By javastuden in forum Java ServletReplies: 0Last Post: 02-03-2012, 11:02 AM -
Desingn time properties missing at run time - Netbeans
By junaid in forum New To JavaReplies: 3Last Post: 12-07-2011, 07:00 AM -
JAVA Programmers Wanted - Full-Time and Part-Time Positions open
By javatrek2020 in forum Jobs OfferedReplies: 3Last Post: 08-23-2011, 12:46 PM -
calculate time diff for particular time period
By baktha.thalapathy in forum New To JavaReplies: 2Last Post: 05-24-2010, 04:10 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks