Is it possible to use an Arduino nano or mega instead of the uno?

Is it possible to use an Arduino nano or mega instead of the uno?