Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: End of file indication

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    15
    My Mood
    Nerdy
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default End of file indication

    Please i noticed that the netbeans IDE doesn't recognize the windows end-of-file indicator Ctrl+Z + Enter.
    aw do i go about this cause am trying to write a while loop using the hasNext() method and the end of file indicator is supposed to signal when to break out of the loop.


  2. #2
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: End of file indication

    This thread has been cross posted here:

    http://www.java-forums.org/new-java/54916-end-file-indication.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting


  3. The Following User Says Thank You to Darryl.Burke For This Useful Post:

    copeg (February 1st, 2012)

  4. #3
    Member
    Join Date
    Jan 2012
    Posts
    57
    My Mood
    Fine
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default Re: End of file indication

    i think u may specify -1 as a condition in a while loop .. because the end of file represents -1 .. where ur while loop gets terminated

Similar Threads

  1. solaris machine /tmp folder, File.exists() cant see the existing file.
    By aragorn1905 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: December 27th, 2011, 09:41 AM
  2. Replies: 3
    Last Post: December 2nd, 2011, 11:53 AM
  3. Replies: 10
    Last Post: January 12th, 2011, 05:48 AM
  4. insert(embed) a file object (.txt file) in MS excel sheet using java.
    By jyoti.dce in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 12th, 2010, 08:16 AM
  5. Replies: 8
    Last Post: January 6th, 2010, 09:59 AM