Standing Waves vs. Energy Eigenstates

The energy eigenstates for a particle in an infinite 1d square potential well and the modes for displacement of a standing wave of a string (length L) between two rigid posts have a similar form:

$y(z)=A\sin(n\pi z/L) \text{ (Classical Standing wave)} \\ \psi(z)=B\sin(n\pi z/L) \text{ (Square Well Stationary State)}$

In the classical case (the standing wave of a string), is the coefficient A arbitrary? If so, what does it depend on? And in the quantum mechanical case, it seems to me like the coefficient is not arbitrary, because we need to integrate the modulus squared of wavefunction to get probability density, so we normalize the wavefunction such that the coefficient is B=sqrt(2/L). Is this correct, or is B arbitrary like A is as well?