Results 1 to 2 of 2
- 05-30-2012, 03:10 PM #1
Member
- Join Date
- May 2012
- Posts
- 1
- Rep Power
- 0
Getting Java To Use Values In A Text File
Hello,
I'm a beginner programmer, and I want to use values written in a text file in my java program.
I don't want to enter the strings directly into the program code.
It is difficult to explain, but I'll try. I have a text file with:
Title: Lost in the subway
situation1: you wake up on a bench in a subway tunnel. Do you:
action1: talk to the old lady at the platform
action2: wait for the train
situation2: the old lady looks away
action3: poke her
And I want Java to read the text file and display "Lost in the subway" as a title.
Then I want to display situation1, and then display the corresponding actions.
And then there is this in another text file:
s1: a1, a2
s2: a2, a3
And I want java to use this to display the actions that correspond with the situation.
If anyone could help me with this, that would be wonderful. I want to be able to write lots of stories, and not have to mess with the java code every time.
- 05-30-2012, 03:29 PM #2
Re: Getting Java To Use Values In A Text File
I'd recommend doing a quick google search of "java file io" as a first stab.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Similar Threads
-
Problems with writing String values to a text file
By Tedward in forum New To JavaReplies: 8Last Post: 06-02-2011, 04:28 AM -
Extracting values from a text file
By kryptonian03 in forum New To JavaReplies: 4Last Post: 03-22-2011, 06:13 AM -
need to input values from a text file into an array and count values
By pds8475 in forum New To JavaReplies: 14Last Post: 01-22-2011, 02:36 PM -
How to Read data from text file and calculate the values?
By janeansley in forum New To JavaReplies: 40Last Post: 07-04-2008, 08:41 AM -
[SOLVED] getting values from a text file
By dav9999 in forum New To JavaReplies: 8Last Post: 04-01-2008, 01:51 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks