| 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 ]
|
 |
 |
|
|
subject: read text
|
|
|