473,327 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

End of File Indicator

11
Hello everybody
I want the end of file indicator in Java
I used the ctrl +Z but it seems not working ?!!
this is the code:

while (input.hasNext())
{
grade=input.nextInt();
total=total+grade;
gradeCounter=gradeCounter+1;
incrementLetterGradeCounter(grade);
}
Mar 18 '08 #1
1 3396
sukatoa
539 512MB
Hello everybody
I want the end of file indicator in Java
I used the ctrl +Z but it seems not working ?!!
this is the code:

while (input.hasNext())
{
grade=input.nextInt();
total=total+grade;
gradeCounter=gradeCounter+1;
incrementLetterGradeCounter(grade);
}
Maybe you need this...

About the value assignments,

You can simplify it like this,

total += grade;
gradeCounter++;

It is a good practice... ;-)

Sukatoa...
Mar 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Shane | last post by:
Hi, Thanks in advance for the help. I have been to many websites and tried several solutions to my problem, but have fixed part of it. It's time to come humbly to the newsgroups for help :-) ...
7
by: Andrew | last post by:
Hello, Is it possible for a file position indicator of an input stream to be greater than the size of a file? And if so could this cause fgetc to somehow write to the file? For example is it...
19
by: wetherbean | last post by:
Hi group..I am writing a playlist management protocol where I have a file that holds all the playlists and a file that holds all the songs....before a playlist is created I need to check to see if...
1
by: Marko Vuksanovic | last post by:
I am trying to implement a file upload progress indicator (doesn't have to be a progress bar) using atlas... I do realize that the indicator cannot be implemented using Update panel control, but is...
6
by: Marko Vuksanovic | last post by:
I am trying to implement a file upload progress indicator (doesn't have to be a progress bar) using atlas... I do realize that the indicator cannot be implemented using Update panel control, but is...
5
by: ericunfuk | last post by:
I'm wondering if the following is fesible. I copy a whole file into memory, then I traverse forwards and backwards in the part of the memory contains the file, to get the chunk of the file I...
4
by: rsaharia | last post by:
Hello All, I need help with this particular .pl file I picked up from http://www.veritools-usa.com/xnf2vhdl.htm What it's supposed to do is really convert an xnf file to a vhdl file. I need it for...
80
by: nicolas.sitbon | last post by:
Hi everybody, in a french C book, the author says that only {fgetc, getc, getchar, fgetwc, getwc, getwchar, fgets, gets, fgetws, getws, fputc, putc, putchar, fputwc, putwc, putwchar, fputs, puts,...
2
by: cmdolcet69 | last post by:
How can i just parse out the Indicator Readings in a text file so that i can fill an arraylist with the indicator values -------------------Indicator Test RAW BIT Values-------------------...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.