O'Leary

Wilkins, J.

The father of David O’Leary, a minor, peti-*180tians that a writ of habeas corpus issue for the son’s release from the custody of the superintendent of the department for defective delinquents at the State farm. The Superior Court judge, after finding the facts, reported the case without decision. G. L. (Ter. Ed.) c. 231, § 111. In so doing, he stated that he was in doubt as to whether "the rights of the boy have been adequately observed and protected, in view of his age and mental condition, in obtaining a confession [and] in receiving and recording the pleas of delinquency,” and was also in doubt as to the constitutionality of the statute under which the commitment was made. G. L. (Ter. Ed.) c. 123, § 113, as appearing in St. 1943, c. 185, § 1, as amended by St. 1947, c. 684, § 1. See now St. 1948, c. 310, § 28.

David O’Leary, born on February 25, 1936, had been in court charged with being a delinquent child on occasions prior to October 1, 1948. G. L. (Ter. Ed.) c. 119, §§ 52 and following, as amended. See Robinson v. Commonwealth, 242 Mass. 401. On that date a police officer apprehended him in the hallway of an apartment building and, suspecting him of having attempted to break and enter an apartment with intent to commit larceny, proceeded to question him. The boy was not advised that he was not required to answer, that what he said would be used against him, or that he had the right to counsel. In the questioning the officer elicited a confession of an attempt to break and enter on September 19, 1948, and of an actual breaking and entering of an apartment on June 27, 1948, and the theft of a radio and $11 in money. The confession was obtained without threats of harm or promises of reward or other improper inducements. The boy was taken to the police station, where he was held for several hours until his mother, being notified, came and took him home. The next morning two complaints were issued, based upon the two offences he had admitted to the officer and charging that he was a delinquent child. His mother was with him in court on this and "all other subsequent appearances.” On October 2 he was asked in the District *181Court if he was guilty of the offences charged. He answered, “Yes,” and pleas of guilty of being a delinquent child were recorded. The complaints were continued for disposition after an application for the boy’s commitment as a defective delinquent was filed by the probation officer. Upon receiving the statutory notice, the department of mental health caused him to be examined by two psychiatrists, who filed with the clerk on the customary form a report, attached to which on the usual form was a medical certificate, reciting that the boy “is mentally defective; that he is not a proper subject for a school for the feeble-minded or for commitment as an insane person; and ought to be committed to a department for defective delinquents.” No notice of the application for commitment or of the subsequent proceedings was given to the boy or his parents or anyone on his behalf. On October 28, the morning of the “hearing,” the mother asked the probation officer for a continuance, as the counsel she had consulted could not then appear. The probation officer told her that “it would be futile to continue the hearing.” Her request was not brought to the attention of the District Court judge, who proceeded with the “hearing,” and upon the medical report, the record, and his personal observation of the boy in the court room, ordered him committed as a defective delinquent to the State farm, where he now is. Neither the boy nor his mother knew or understood the nature or scope of the proceedings. She expressed her intention to appeal from the order of commitment, but no such appeal was entered. An appeal, however, was entered upon the delinquency complaints. In the Superior Court, it appearing that he was in custody as a defective delinquent, the complaints were filed.

To reach a decision, we need begin only with the filing of the application for commitment. On the course we are to take are two questions for determination. One, procedural, is whether habeas corpus is a proper remedy. The other, of *182substance, is whether the governing statute1 requires notice to the person whose commitment is sought. We shall consider them in the inverse order.

The decisive facts for present purposes are that no notice was given to this boy or to anyone on his behalf, and that neither he nor his mother, his only companion in court, comprehended the nature or scope of the proceedings. “The essential elements of due process of law are notice and opportunity to defend.” Simon v. Craft, 182 U. S. 427, 436. Ballard v. Hunter, 204 U. S. 241, 255. Without them there can be, in truth, no real hearing. While § 113 expressly makes accessible to a defendant and his attorney the report of the department of mental health, it does not in terms prescribe that, before the hearing, there must be reasonable notice to a defendant of the filing of an application for his commitment. On the other hand, such notice is not proscribed. That prohibition lacking, we construe § 113 as impliedly calling for notice in accordance with the elements inherent in due process. That section, therefore, is not unconstitutional as wanting a provision for notice of the filing of the application to the person whose commitment as a defective delinquent is sought. A similar result was reached *183in People v. Branham, 291 N. Y. 312; S. C. 292 N. Y. 127. Extension to this case of the principle laid down in Dowdell, petitioner, 169 Mass. 387, and followed in Le Donne, petitioner, 173 Mass. 550, relating to insane persons, does not favorably impress us. Compare Barry v. Hall, 98 Fed. (2d) 222, 228 (C. A. D. C.); Shapley v. Cohoon, 258 Fed. 752, 755 (D. C. Mass.). The respondent does not so argue.

The hearing being invalid for noncompliance with the requirement of notice, the question is left whether habeas corpus is a proper remedy. No provision for appeal under § 113 has been enacted. Compare, in case of commitment to the custody of the youth service board, G. L. (Ter. Ed.) c. 119, § 81, as amended by St. 1948, c. 310, § 18. Compare also Sylvester v. Commonwealth, 253 Mass. 244.

The respondent contends that ample relief is afforded by G. L. (Ter. Ed.) c. 123, §§ 89A, as amended by St. 1941, c. 194, § 91; 89B, as amended by St. 1938, c. 254, § 1, and St. 1941, c. 194, § 102; and 118, as appearing in St. 1947, c. 684, § 3. An examination of those sections discloses the unsoundness of this contention. The right under §§ 89A and 89B, as so amended, is given not to the person committed but only to others, who may or may not take any action on his behalf. It is available only upon the prepayment of, and the giving of security for, the costs of travel to and from the place of hearing. It might not extend to an inquiry into the original grounds of the commitment and to the reversal of the order in an appropriate case. A petition under this section, it is certain, could not be permitted *184to attack the constitutionality of the statute of which it is a part. Cabalan v. Department of Mental Health, 304 Mass. 360. Section 118, as so appearing, relates to the quite different subject of periodic examinations of persons committed. See Commissioner of Correction, petitioner, 324 Mass. 535, 538.

A writ of error lies only to review proceedings according to the course of the common law. Giarruso v. Payson, 272 Mass. 417, 419. It does not extend to this relatively new type of proceeding for the commitment of defective delinquents. And in any event, in the present case the petitioner's principal grounds of objection would not appear on the face of the record. See MacEachern v. S. S. White Dental Manuf. Co. 304 Mass. 419, 422; Silverton v. Commonwealth, 314 Mass. 52.

Habeas corpus is the historic remedial process whenever it appears that one is deprived of his liberty without due process of law in violation of the Constitution of the United States. Mooney v. Holohan, 294 U. S. 103, 113. It cannot take the place of a writ of error in a case which was within the jurisdiction of the court, and where the only question raised is the correctness of the rulings of the court. Flito’s Case, 210 Mass. 33, 35. Connors, petitioner, 254 Mass. 103, 105. Kelley, petitioner, 292 Mass. 198, 199-200. Eagles v. United States, 329 U. S. 304, 311-312. “The only ground on which . . . any court, without some special statute authorizing it, will give relief on habeas corpus to a prisoner under conviction and sentence of another court is the want of jurisdiction in such court over the person or the cause, or some other matter rendering its proceedings void." Ex parte Siebold, 100 U. S. 371, 375. In re Frederich, petitioner, 149 U. S. 70. Frank v. Mangum, 237 U. S. 309, 326-327. See Feeley’s Case, 12 Cush. 598; Herrick v. Smith, 1 Gray, 1, 12, 50; Jones v. Robbins, 8 Gray, 329, 350; Commonwealth v. Huntley, 156 Mass. 236, 237; Bishop, petitioner, 172 Mass. 35, 36-37. See also Farnham v. Pierce, 141 Mass. 203, 206. Here the proceedings were void. Hence the writ lies. In these circumstances, G. L. (Ter. Ed.) c. 248, § 1, Second, *185denying the right to prosecute a writ of habeas corpus to one who “has been convicted or is in execution upon legal process, civil or criminal,” has no application.

Writ to issue.

G. L. (Ter. Ed.) c. 123, § 113, as appearing in St. 1943, c. 185, § 1, as amended by St. 1947, c. 684, § 1 (hereinafter called § 113): “At any time prior to the final disposition of a case in which the court might commit an offender ... for any offense not punishable by death, a district attorney, probation officer, or officer of the department of correction, public welfare or mental health may file in court an application for the commitment of the defendant ... to a department for defective delinquents established” under G. L. (Ter. Ed.) c. 123, §§ 117, 124. “On the filing of such an application the court may continue the original ease from time to time to await disposition thereof . . . [and] shall give notice to the department of mental health . . . [which] shall cause such person to be examined by two experts in insanity with a view to determining whether or not he is mentally defective, and shall file a written report with the clerk of the court in-which the case is pending and the report shall be accessible to the court, the probation officer, the district attorney and to the defendant and his attorney. If, on a hearing on an application for commitment as a defective delinquent, the defendant is found to be mentally defective, and the court, after examination into his record, character and personality, finds that he has shown himself to be an habitual delinquent or shows tendencies toward becoming such and that such delinquency is or may become a menace to the public, and that he is not a proper subject for a school for the feeble minded or for commitment as an insane person, the court shall make and record a finding to the effect that the defendant is a defective delinquent and may commit him to such a department for defective delinquents according to his age and sex, as hereinafter provided.”

“ ... Any parent, guardian, relative or friend of a person committed to the custody or supervision of ... a department for defective delinquents may at any time file a petition for a hearing in the probate court ... to establish that further custody or supervision is not required for the welfare of such person or the public; and upon payment of the necessary traveling expenses by said petitioner, from the place where such person is detained to the place of hearing, and the giving of security for the payment of necessary expenses for a return to such place of detention, if a return shall be ordered, the probate court may by order require the attendance of such person at such hearing. ...”

“If, at said hearing, the contention of the petitioner is sustained, the probate court may order the immediate discharge of such person . .