On February 2,1961, the relator was charged by an information with a violation of section 1140 of the Penal Law. He sought and was granted youthful offender treatment and entered a plea of guilty. Sentence was imposed by the District Court but sentence was suspended and the relator was placed on probation for one year. These proceedings are not challenged. On September 19, 1961 an information was filed in the District Court charging relator with a violation of probation in that he had allegedly committed another violation of section 1140. Supporting the information was a sworn statement made by the relator admitting the facts of the second violation. On arraignment in District Court the court read the information to the relator including the statement of the relator annexed thereto, and advised him of his right to have counsel and of his other rights. The relator stated that he did not wish time to get a lawyer and when asked for his plea he replied “ Guilty The minutes of the proceedings reveal that the court then interrogated the relator at some length to assure itself that he understood that he was being charged with a violation of probation and the nature of the charge constituting the violation. Following such interrogation the court stated its opinion that the relator understood the nature of the charge against him and that there was no reason to delay completion of the arraignment. Thereupon the court again asked relator how he pleaded and the relator again replied “ Guilty ”. Sentence was adjourned pending probation report and psychiatric examination. At least one parent of the relator was present during these proceedings.
*361On November 22, 1961, the District Court vacated the suspended sentence and imposed sentence of confinement for an indeterminate period at the Elmira Deception Center. On this occasion the relator’s mother was in the courtroom together with counsel who appeared in his behalf. No question was raised as to the jurisdiction of the court or the regularity of the proceedings either on arraignment or sentence.
The District Court had jurisdiction of both the offence and the offender. Upon this application for a writ, the relator challenges the legality of his sentence upon the grounds that the information .charging him with violation of probation is insufficient as a matter of law and that the plaintiff did not have the opportunity of being heard pursuant to section 935 of the Code of Criminal Procedure.
In this context, the code provision which relates to violation of probation provides in part: “ On his being arraigned and after an opportunity to be heard the court may revoke, continue or modify his probation. If revoked, the court may impose any sentence it might have originally imposed.” Upon the basis of the authorities this court finds that the requirements of section 935 were met and, accordingly, dismisses the writ herein.
In People ex rel. Massengale v. McMamn (8 A D 2d 645) a probationer was charged with violation of the terms of his probation and imprisoned on conviction thereof. He sought his release upon a writ of habeas corpus contending that the hearing required by the code provisions already quoted had been denied. The court there said: 11 No witnesses were sworn but the probation officer stated the substance of his department’s report which indicated several illegal activities on the part of appellant after he had been permitted to go to Texas. The court then asked appellant what he had to say and appellant replied 1 Not a thing, sir.’ ”
The court referred to section 935 of the code, and went on to say: ‘1 This section provides in substance that if a probationer violates the conditions of his parole the court may revoke the probation after giving the probationer 1 an opportunity to be heard ’. It has been held that this section contemplates notice to the probationer of the violation charged with an opportunity to attack or deny the charge, but there is no requirement of formal procedure (People v. Oskroba, 305 N. Y. 113, 117). On the record before us the requirements of section 935 were satisfied. While no witnesses were sworn to prove any violations the essence of his probation record was stated to appellant and he neither attacked nor denied the violations therein shown.”
*362The record in the case at bar as developed in the District Court furnished that court with a much stronger basis for proceeding than appears in the cited case since the facts with reference to the violation of probation were supported by the relator’s sworn admission. While there is some contention that the relator was not of sufficient mental capacity to understand and appreciate the nature of the proceedings, the record completely fails to sustain such a contention. The ‘ ‘ opportunity to be heard” referred to in the code requires notice to the probationer of the violation charged with an opportunity to attack or deny the charge. (People v. Oskroba, 305 N. Y. 113, 117.) The Court of Appeals has indicated in the cited case that there is no requirement of a formal procedure in this respect but a reasonable opportunity to be heard within the common understanding of due process. From the record of the arraignment proceedings in the District Court in the case at bar, it appears that the court handling the arraignment was fully solicitous of the defendant’s legal rights.
“Probation being a matter of grace, its revocation also depends on the sound exercise of judicial discretion. (Burns v. United States, 287 U. S. 216, 220.) ” (People v. Oskroba, supra, p. 118.)
In determining the present application, this court does not function in an appellate capacity. The sole purpose of the instant proceeding is to test the jurisdiction of the District Court, and, more precisely, the legality of the sentence imposed. The test is one of power not of propriety or good judgment (cf. People ex rel. Kern v. Silberglitt, 4 N Y 2d 59, 61). This court determines that the District Court had such power and this disposes of the proceeding. (See Matter of Nunz v. Monroe County Court, 5 Misc 2d 592, where the court acted upon an admission by petitioner of violation of probation; and Matter of Toorans, 154 N. Y. S. 2d 160,169,170).
The relator was remanded to custody pending determination of this application. The writ is now in all respects dismissed.