• Post Reply Bookmark Topic Watch Topic
  • New Topic

reading 1 column and printing  RSS feed

 
garrett houlton
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello i have to read a text doc that has 14939 20140801 86 (station# year/month/day temp) many more following but i have to read the temp and determine if it is under 80 degress my code so far is the second scanner reads the text file i need the 1st scanner reads the user info
 
Raymond Gillespie
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having trouble figuring out what your question is.

Also please use code tags so your code is easier to read.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12562
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"scan" and "sc" are wretched variable names. They tell us nothing. And they will tell you nothing in a month when you come back to this code. You are not writing text messages, so there is no reason not to use descriptive names.

Can you be more specific what your problem is? What do you mean by "1 column"?

I would also suggest you break up your code into methods. One method should do one thing. Your main method should have almost no code in it whatsoever. you should probably read this.
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You appear to be getting confused. What have birth place and similar got to so with the temperature?
You are creating a List and not doing anything with it. Why?
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added the code tags: it does improve the look of the post, doesn't it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!