aspose file tools*
The moose likes Java in General and the fly likes read text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "read text" Watch "read text" New topic
Author

read text

brian yuen
Greenhorn

Joined: Oct 20, 2003
Posts: 20
Account class

checking class

Record class

Bank

so the output file would be
:
record.txt
121212,Brian,123456
Account.txt
123456,999.99
what i wanna do is if like
//get an customerId from input, if (customerId == 121212 && accNO(in record.txt) == accNo(in Record.txt)
display the balance(999.99);
how can i do that, i know i can use String Tokenizer scan the text file, but
any better way to get communication between two files?
Maverick Lasa
Greenhorn

Joined: Oct 18, 2003
Posts: 23
hello brian,
i think you wanted to write the condition as:

i know i can use String Tokenizer scan the text file
you can use String.indexOf and String.substring which I think is a little bit faster than StringTokenizer. any better way to get communication between two files?

what do you mean by "communication between two files"?
why don't you add a Account.readAccount() and Record.readRecord to get the data from their corresponding files, then use the same account and record instances to compare the account number?
the simple, the better
mavedrive;
[ October 24, 2003: Message edited by: Maverick Lasa ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: read text
 
Similar Threads
constructor with array type.
JUnit Testing Problem
Very Confused!!
JUnit Test Query
Basic Query in Spring