-
Another Array Problem
Okay I'm kinda stuck on this problem, I'm trying to get a java program to read data from a file. This data are random numbers representing degrees in temperature. I can't figure out how to count each one, to say that I have this many days at 100 degrees, this many days at 50 degreees. Can anyone help, here is the little code I have.
import java.io.*;
public class temp {
public static BufferedReader inFile;
public static PrintWriter outFile;
public static void main(String[] args) throws IOException {
int tempcount;
int k;
inFile = new BufferedReader(new FileReader("File.txt"));
outFile = new PrintWriter(new PrintWriter("Out.txt"));
tempcount = Integer.parseInt(inFile.readLine());
int [] count = new int [200];
for (k = 0; k < 200; k ++) {
}
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks