There is no excuse for carrying a knife in a public place unless you are depositing it as part of a knife surrender.
If you are stopped and a police officer suspects that the knife has been used in a criminal offence, you may have to answer questions regarding how you came to have it.
For more information also contact Childline.