On early Sony Ericsson models, it was possible to reset all settings to factory settings without deleting personal data and programs. On the latest models there is no such possibility.
To perform a reset, go to Menu - parameters - general and select general reset.
To reset to factory settings, select Reset settings.
To format the phone memory - General reset. A general reset is best done only in case of serious problems with the installed program or before selling the phone.
The default code is 0000