When knitting with multiple colors or when just changing from one to another color, you can weave in the end as you continue with the new color. When you start the new color you want to make sure to twist the loose end around your previous color to avoid a hole, then place the working yarn behind the tail, and pick up the yarn alternating above and under the tail end to weave it in. Weave for about 4-6 sts and then you can cut the remaining tail.
This way you don't have to fasten the threads at the end.