No person can be convicted of a public offense, unless by the verdict of a jury, accepted and recorded by the court, or upon a plea of guilty, or upon final judgment for or against him upon a demurrer to the indictment, or upon a judgment of a police or justice’s court in cases in which such judgment may be lawfully given without the intervention of a jury or grand jury.
R.L.1910, § 5550.