keeping textures when joining objects

im working on my 3d animation college final and i need to know how you can join objects but still have each object keep its texture. i asked my professor and he has no idea.

you can have no more than 16 materials with textures in one object
so when you join just make sur your are under this quantity and everything should be fine

Salutations