Every now and then I get or write some minimal code samples to achieve tasks. What's the usual practice for storing these samples (which could prove useful later on) ? Have a separate source folder or create a separate project ?
I always use a separate project called scratchpad and I follow the same principles I do with the rest of my code (they have unit and/or integration tests etc).
Depending on the size of the creation. For smaller 'mixed' stuff you can have one project called 'bazaar'. But if you have some more complex (but still experimental) code you might want to create one project for each. Example for latter: "spring-mvc-poc" where poc stands for proof of concept.
Not a java guy, but I typically try and put this sample code inside unit tests -- at the very least it can provide a handy way to execute the code to check it out in action.