During the introductory class on Hamiltonian mechanics after we had learnt the Lagrangian formalism, our professor said
"We cannot use Lagrangian mechanics to find the state of a system at any particular instant (he did not give any explanation), so that is why we use Hamiltonian mechanics."
But I think he could be incorrect, because when I did problems using Lagrangian as well as Hamiltonian I could find the generalized coordinates as a function of time. Can anybody explain where is the conceptual loop hole?