Originally posted by Candy Bortniker:
Is transaction a Vector or an AccountTransaction? What should it be?
transaction is the Vector and I think that is what it should be.
Originally posted by Ray Stojonic:
Billy,
You certainly raise a good point, but...while it's much better form to use equals(), == will still work because setActionCommand( "Done" ) (which we don't see here, but it must have been set) would put the 'Done' String literal into the String pool, which would be the same String object as in getActionCommand() == "Done"
Are you printing your catch block? ie:
catch( IOException ioe ) { System.out.println( ioe ) }
if not, you don't know if you'e getting an exception or not
prove me wrong, put a System.out after the .writeObject() and see if it prints
--------------------------------------------------------------------------------
Originally posted by Candy Bortniker:
ObjectOutputStream oos = new ObjectOutputStream (
new FileOutputStream( "account.dat" ) );
Originally posted by Candy Bortniker:
The file goes to the same directory that the program is in which is fine. The file gets created there is just nothing in it.
Oh sure, it's a tiny ad, but under the right circumstances, it gets bigger.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|