This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes text file ?? simple program Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "text file ?? simple program" Watch "text file ?? simple program" New topic
Author

text file ?? simple program

mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
how to generate a text file that contains a random string of letters ?
it should be able to control the number of letters in one line and the number of lines in the text file.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

You need a loop that runs for every line you want to generate; a loop that runs for the number of characters you want to generate; and a method to generate one of 26 characters.
Why would you pose this question in the advanced forum?


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
thanks for the solution.
did you mean to say that this question is not quite ok for this forum, ie advanced. let me know because i have some more such questions that i forsee that may come up and the appropriate forum where i can post them.
Originally posted by Michael Ernest:
You need a loop that runs for every line you want to generate; a loop that runs for the number of characters you want to generate; and a method to generate one of 26 characters.
Why would you pose this question in the advanced forum?
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Hi Mark -
There's a good point behind this exchange, which is that the terms beginner, intermediate, and advanced can be quite relative to whoever's posting.
I'd say, for starters, post your questions in JiG Beginners. If the questions appear beyond the average crowd in there, I'm sure the moderator will eventually suggest Intermediate, and so on.
Probably the easiest way to tell, though, is by reading other posts. If they're way over your head, drop down a level.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: text file ?? simple program
 
Similar Threads
Parsing Characters?
Creating text boxes dynamically
generate a text file with random no of characters
how to string search ?
Mail attachment charset problem