We consider a Hamiltonian systems which is invariant under a one-parameter unitary group and give a criterion for the stability and instability of bound states for the degenerate case. We apply our theorem to the single power nonlinear Klein-Gordon equation and the double power nonlinear Schr?dinger equation.