Some good answers have been given.
Bankruptcy has changed a great deal over the years and is not static now. Whenever someone is considering this option, it is important to talk to a bankruptcy attorney before making a decision. Never rely solely on information and advice from friends, co-workers, family members, even if they have been through it. They can give their own experience. But only a true professional in the field will know what the rules and options are at any given time.
Also, bankruptcy varies a great deal from nation to nation. Some countries have very punitive bankruptcy laws, others are much more forgiving and try to preserve economic assets.
Latest Answers