Results 1 to 3 of 3
- 07-24-2012, 03:49 PM #1
Member
- Join Date
- Apr 2012
- Location
- Gujarat , India
- Posts
- 5
- Rep Power
- 0
Very noob : Pls describe this code :P
I didn't understand what is hasNext() and what is next()Java Code:import java.io.*; import java.util.Scanner; public class ScanXan { public static void main(String[] args) throws IOException { Scanner s = null; try { s = new Scanner(new BufferedReader(new FileReader("xanadu.txt"))); while (s.hasNext()) { System.out.println(s.next()); } } finally { if (s != null) { s.close(); } } } }
may be look too noob but hope i will get help.
:(sweat)::(-::=-::=(::s::(doh):
- 07-24-2012, 04:08 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Re: Very noob : Pls describe this code :P
Have you read the API documentation for the Scanner class? Noone can do without the API documentation. Here it is: link.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 07-24-2012, 07:53 PM #3
Re: Very noob : Pls describe this code :P
Please go through the Forum Rules -- particularly the third paragraph.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
I am a super noob with a super noob question.
By LittleZoppo in forum Java AppletsReplies: 3Last Post: 04-27-2012, 03:50 AM -
help in describe code
By m1ke4fun in forum New To JavaReplies: 5Last Post: 10-21-2011, 06:05 PM -
Find difficulty to describe the page flows in a lengthy XML format
By rayethan in forum XMLReplies: 2Last Post: 04-01-2010, 12:55 PM -
[SOLVED] Please describe this code
By ezee in forum New To JavaReplies: 12Last Post: 03-18-2009, 05:33 PM -
Help im a noob.. a super noob on java..
By critdevil in forum New To JavaReplies: 12Last Post: 03-07-2009, 03:17 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks