How to save multiple classes in 1 file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Patryk Ka
    New Member
    • Nov 2010
    • 1

    #1

    How to save multiple classes in 1 file?

    I'm beginner in Java code, and I can't find any way to add new classes to existing file with saved before classes.

    I have to write little RentCar database (without MySQL etc.). When I use my "Add new car to the list" code it clean up previous position and make file empty before save. How set the file pointer at the end of file to add new positions?
  • Sean Pedersen
    New Member
    • Dec 2010
    • 30

    #2
    There can only be one public class per file, the rest must be private.

    Comment

    Working...