We granted the Commonwealth’s application for further appellate review limited to whether the specific disposition of the youthful offender indictment ordered by the Appeals Court was correct. See Commonwealth v. Lamont L., 54 Mass. App. Ct. 748, 754 (2002).
The juvenile was indicted as a youthful offender, see G. L. c. 119, § 54, on a charge of assault and battery by means of a dangerous weapon, and he was also indicted as a youthful offender on a charge of assault and battery. He was tried by a jury in a juvenile session of the District Court. At the close of the *843Commonwealth’s case, the juvenile moved for a required finding of not guilty or “not youthful offender’’ on both charges. The motion was denied. The trial concluded with his adjudication as a youthful offender on two charges of assault and battery (one as a lesser included offense of the charge of assault and battery by means of a dangerous weapon). The Appeals Court held that the juvenile could not have been convicted as a youthful offender, as the assault and battery charge as such was not a crime for which the juvenile, “if he were an adult, would be punish[ed] by imprisonment in the state prison,” as required by the youthful offender statute, G. L. c. 119, § 54. Commonwealth v. Lamont L., supra at 754.1 The Appeals Court therefore reversed the judgment on the assault and battery charge, set the verdict aside, and directed that an order enter dismissing the indictment. Id. at 755. It is this order that is contested.
The issue thus is whether, when the Commonwealth indicts a juvenile as a youthful offender and improperly joins a companion indictment on a misdemeanor charge against the same juvenile, and, after trial, the juvenile is adjudicated a youthful offender on the misdemeanor charge, the proper remedy is to vacate the misdemeanor adjudication and dismiss the indictment (as the Appeals Court ordered in this case) or to order the entry of a delinquency finding on that misdemeanor offense. We conclude that the entry of an adjudication of delinquency should be ordered in such circumstances.
The youthful offender statute allows the Commonwealth to proceed by means of indictment against a juvenile only for those offenses “which, if he were an adult, would be punishable by imprisonment in the state prison.” G. L. c. 119, § 54.2 Assault and battery is not punishable by imprisonment in the State *844prison. See G. L. c. 265, § 13A. Thus, we agree with the Appeals Court that it was improper to indict the juvenile as a youthful offender on the simple assault and battery charge.3 We do not agree, however, with the Appeals Court’s disposition of that offense.
The indictment brought against the juvenile properly stated an offense: assault and battery. Although the Commonwealth should have proceeded on the assault and battery offense by complaint, no harm resulted. The indictment at issue was tried in conjunction with another offense that was properly the subject of a youthful offender indictment, that for assault and battery by means of a dangerous weapon.4 The juvenile was given full notice of the offense against him and an opportunity to defend against it. The inclusion of an additional, improperly brought allegation that subjected him to punishment as a youthful offender did not prejudice his defense to the underlying charge. See Commonwealth v. King, 387 Mass. 464, 468 n.2 (1982), quoting G. L. c. 277, § 34 (“An indictment shall not be dismissed or be considered defective or insufficient if it is sufficient to enable the defendant to understand the charge and to prepare his defense . . .”). Because the two offenses properly could be joined, see Commonwealth v. Quincy Q., 434 Mass. 859, 865-866 (2001), there was no prejudice to the juvenile in the trial procedure: had a complaint been brought and joined with a youthful offender indictment, he would have been subject to a public jury trial in any event.
If the juvenile properly had raised the issue by means of a motion to dismiss,5 the youthful offender indictment for assault and battery would have been dismissed and the Commonwealth could have proceeded by means of a complaint, joined for trial with the youthful offender indictment charging assault and bat*845tery by means of a dangerous weapon. See id. “In a criminal case, any . . . objection based upon defects ... in the complaint or indictment, other than a failure to show jurisdiction in the court or to charge an offense, shall only be raised prior to trial . . . .” G. L. c. 277, § 47A. Failing to object to such a defect prior to trial ordinarily waives any argument pertaining to that defect. See Commonwealth v. Beneficial Fin. Co., 360 Mass. 188, 229-230 (1971), cert. denied sub nom. Farrell v. Massachusetts, 407 U.S. 910, and sub nom. Beneficial Fin. Co. v. Massachusetts, 407 U.S. 914 (1972).
After notice of the charge against him, the juvenile has been tried by a jury and found delinquent by reason of assault and battery. We see no reason to dismiss the indictment. As in Commonwealth v. Quincy Q., supra at 865-867, the jury have found that the juvenile committed an offense that would adjudicate him delinquent, but not a youthful offender. The result should be the same. A finding of delinquency is to enter on that charge and he is to be sentenced accordingly.
So ordered.
In regard to the other offense of which the jury convicted only so much as charged assault and battery, because that was properly brought as a youthful offender indictment (it originally charged assault and battery by means of a dangerous weapon, an offense punishable by imprisonment in State prison), the Appeals Court was correct in ordering the judgment vacated, the verdict set aside, and the matter remanded to the Juvenile Court for an entry on the docket adjudicating the juvenile delinquent on a complaint of delinquency by reason of assault and battery and resentenced accordingly.
General Laws c. 119, § 54, contains other prerequisites for the Commonwealth to proceed by youthful offender indictment that are not at issue in this case.
The Commonwealth stated at oral argument that prior to the opinions in Commonwealth v. Quincy Q., 434 Mass. 859, 866 n.8 (2001), and Commonwealth v. Ulysses H., 52 Mass. App. Ct. 497, 501 n.7 (2001), it was common practice to proceed in this manner.
This offense is punishable by imprisonment in State prison. See G. L. c. 265, § 15A.
Although the juvenile filed a pretrial motion to dismiss based on McCarthy grounds, see Commonwealth v. McCarthy, 385 Mass. 160, 163 (1982), he did not raise the present claim.