According to my book, uncertainty Q = 0 (where Q is an observable) is true when the state function is an eigenfunction.
The energy eigenfunction for a particle in a 1-D box with infinitely high walls is sin(n*pi*x/a). This implies that the linear momentum, p, is known with zero uncertainty...