
93 Cal.App.2d 736 (1949)
THE PEOPLE, Respondent,
v.
RICHARD SCHERBING, Appellant.
Crim. No. 2547. 
California Court of Appeals. First Dist., Div. One.  
Sept. 23, 1949.
 Natalie J. Holly and W. O. Weissich for Appellant.
 Fred N. Howser, Attorney General, Clarence A. Linn and B. Abbott Goldberg, Deputy Attorneys General, for Respondent.
 PETERS, P. J.
 Appellant was convicted of a violation of section 4502 of the Penal Code. He appeals from the judgment of conviction and from the order denying his motion for a new trial.
 Section 4502 provides that "Every prisoner committed to a State prison who, while at such State prison ... possesses or carries upon his person ... any dirk or dagger or sharp instrument, ... is guilty of a felony and shall be punishable by imprisonment in a State prison for a term not less than five (5) years." The uncontradicted evidence shows that appellant, while an inmate of San Quentin under what purports to be a commitment from the Youth Authority, was found to possess a homemade sharp-pointed knife with a 5 1/2-inch blade sharpened along one side. Appellant does not attack the sufficiency of the evidence. His basic contentions are that he was not lawfully committed to San Quentin, and that only one who has been lawfully committed to a state prison can violate section 4502.
 The basic facts are not in dispute. In 1946, when appellant was 18 years of age, he was convicted, after a plea of guilty, *739 of second degree burglary and sentenced to one year in the county jail. Execution of the sentence was suspended and appellant was formally "committed" to the Youth Authority. (Welf. & Inst. Code,  1732.) This was in May, 1946. Under the then existing law, both the commitment and the judgment erroneously refer to the offense as a felony. (See 1947 amendment to section 17 of th Penal Code for the present law on this subject.) Under date of August 27, 1946, the Youth Authority issued its "commitment" which states that, upon the recommendation of its diagnostic clinical officer, the Authority "orders" and "adjudges" that appellant be committed to San Quentin Prison. Appellant was received at the prison by virtue of this document and has been confined there ever since. He was so confined on July 5, 1947, the date upon which he admittedly possessed a knife in violation of section 4502, if that section is applicable to him.
 The theory of appellant is that, on the date in question, he was not a prisoner "committed" to a state prison within the meaning of section 4502. He argues that the Legislature has used the term "commitment" in that and other sections of the Penal Code to refer only to action by a court or judicial body, and has not used the term to refer to action by any administrative agency such as the Youth Authority. Therefore, so he contends, the commitment under which he was being detained was void, he was being unlawfully held in San Quentin, and therefore could not violate section 4502.
 [1] These arguments are fallacious. A "commitment," in the legal sense, may be issued, lawfully, by other than a judicial body. The Penal Code clearly provides that the Youth Authority and the Adult Authority may make orders transferring prisoners under their supervision from one state institution to another. Such orders of transfer are lawful, and the prisoner confined pursuant to such order is lawfully committed to the new prison. (People v. Howard, 120 Cal.App. 45 [8 P.2d 176]; People v. French, 61 Cal.App. 275 [214 P. 1003].) Section 5077 of the Penal Code expressly confers on the Adult Authority the power of "commitment of a prisoner to a particular State prison." Section 1767 of the Welfare and Institutions Code provides that the power of the Youth Authority to make orders "committing to an institution" any person under the control of the Authority may not be delegated. These sections demonstrate that the Legislature has not used the word "commitment" to refer solely to judicial action. *740
 [2] Next, appellant urges that he was not lawfully committed because he was only convicted of a misdemeanor, and misdemeanants, according to appellant, may not be confined lawfully in the state prison. He also contends that, in any event, the Youth Authority has no power to confine a youthful offender in the state prison. The respondent concedes that appellant was convicted only of a misdemeanor. Such concession is undoubtedly in accordance with the law here applicable. (See section 17 of the Penal Code as it read prior to the 1947 amendment.) On these points the argument is that, traditionally, misdemeanors have never been punishable in a state prison in California. (See Pen. Code,  17, 18 and 19; Ex parte Arras, 78 Cal. 304 [20 P. 683]; Ex parte Ah Cha, 40 Cal. 426.) It is then contended that, in enacting the Youth Authority Act, the Legislature could not have intended to modify this well-settled procedure by permitting youthful misdemeanants to be confined in a state prison while continuing to prohibit like punishment for adult misdemeanants. It is pointed out that the main purpose of the Youth Authority Act was to protect society by substituting for retributive punishment of youthful offenders "training and treatment directed toward the correction and rehabilitation of young persons." (Welf. & Inst. Code,  1700.) Appellant argues that youths cannot be corrected and rehabilitated by confining them with hardened and adult offenders.
 These arguments are interesting but unsound. We agree that it is the purpose of the Youth Authority Act to rehabilitate youthful offenders, and that all the provisions of the act should be construed in view of this main purpose. To accomplish this main purpose the Authority is given the broadest powers in the broadest terms to utilize all state institutions and facilities. Thus, section 1766 of the Welfare and Institutions Code gives the Authority power to confine all offenders committed to its charge "under such conditions as it believes best designed for the protection of the public." Section 1753 provides that "For the purpose of carrying out its duties, the Authority is authorized to make use of law enforcement, detention, probation, parole, medical, educational, correctional, segregative and other facilities, institutions and agencies, whether public or private, within the State." These sections make no distinction between youthful offenders who are convicted of a misdemeanor and those convicted of a felony. The sections empower the Authority to use all state institutions, including prisons, for any person within its control, *741 whether felon or misdemeanant. (See, also, sections 1742(f) and 1772 of the Welfare and Institutions Code, specifically referring to offenders under control of the Authority who have been placed in state prisons.) [3] While under section 1737.1 of the Welfare and Institutions Code as amended in 1945 (Stats. 1945, ch. 781, p. 1470), the Authority, when it finds a youthful offender to be incorrigible, "may return him to the committing court" and such court may "commit" the offender to the state prison or county jail in accordance with law, such section is not exclusive. The purpose of the act was to give the Authority flexible powers in the handling of its charges. Only when the case is one that, in the opinion of the Authority, is completely hopeless, would resort be had to section 1737.1. That is so because if the Authority returns the offender to the court, the offender would then have to serve the minimum term fixed for the offense and could not be discharged or placed under less stringent control.
 [4] It thus appears that, under the terms of the statutes involved, the Authority had legislative power to commit appellant to San Quentin. But, says appellant, if the statutes be so construed they are unconstitutional, either because they result in an unlawful delegation of judicial power, or because, so construed, they deny equal protection of the laws to youthful misdemeanants by permitting them to be confined in state prisons.
 These arguments are unsound. Once it is determined that the Legislature did not intend the term "commit" to be limited to judicial action, the law is well settled that the Legislature may authorize an administrative agency such as the Youth Authority to "commit" or transfer charges within its control to state prisons. (See anno. on this subject in 95 A.L.R. 1455.) [5] The treatment of youthful offenders, differently from adult offenders, even where such treatment results in a longer confinement of youthful offenders than could be imposed on adult offenders for the same offense, has been upheld in this state. Thus, under the act, a misdemeanant committed to the Authority, may be kept under its control until the person so committed reaches the age of 23. (Welf. & Inst. Code,  1770.) The fact that a youthful offender may thus be restrained of his liberty for a longer period than an adult could be for the same offense, does not render the act unconstitutional. (In re Herrera, 23 Cal.2d 206 [143 P.2d 345]; Ex parte Nichols, 110 Cal. 651 [43 P. 9]; Ex parte Liddell, 93 Cal. 633 [39 P. 251]; see anno. in 3 A.L.R. 1614.) *742 [6] Appellant, while recognizing the rule of these cases, nevertheless urges that the juvenile has been deprived of equal protection when he is subjected to a harsher punishment than that imposed on adults, namely, confinement in a state prison, when an adult misdemeanant must be confined in a county jail. The argument goes that such a classification has no substantial, just and reasonable relation to the object of the legislation; that longer detention of juveniles and their segregation are reasonably related to their peculiar need for and adaptability to reform, education and rehabilitation, but that no such justification exists for placing adults in county jails and juveniles in a state prison where they will come into contact with hardened offenders; that legislation that singles out the youth for such purposes cannot be justified on reformation grounds and therefore cannot be upheld. The basic premise of this argument is that there is a better chance of rehabilitation in the county jail than exists in state prisons. In view of the well-known fact that no rehabilitative efforts at all are made in many of the county jails, this basic premise may well be questioned. Moreover, the basic theory of the act is to empower the Authority to make its treatment fit the individual offender rather than to be predicated on the crime committed. There are vicious, hardened youthful offenders who are extremely dangerous to society. The Legislature has determined that the Authority should have power to imprison such offenders in a state prison. Such a classification is not unreasonable, and, in our opinion, is valid.
 [7] There is another complete answer to the points raised by appellant. Even if the various provisions of the Youth Authority Act here under attack were unconstitutional (which they are not), it would not result in a reversal of the conviction. Appellant was confined under a commitment in the state prison. While so confined he unlawfully possessed a knife. It is no defense to a prosecution for unlawfully possessing a knife in prison under section 4502 of the Penal Code, that the statute under which the inmate is confined is unconstitutional. The statute was passed to protect the guards and other inmates of the prison. It is a reasonable regulation. The fact that the particular inmate may be unlawfully confined certainly does not confer upon him the right to possess weapons denied to other inmates. If the purpose of the statute is to be achieved, and obviously the purpose is a sound one, it makes no difference why the prisoner has been confined, or that he may be legally entitled to release. While an inmate, *743 necessity requires that the prisoner submit to prison regulations, and certainly section 4502 is a reasonable regulation.
 Appellant has cited no case holding that a statute such as section 4502 does not apply to one unlawfully confined. He does cite some cases relating to escape statutes. [8] There are cases holding that one unlawfully confined who escapes from such confinement, where the confinement is without color of authority, does not violate a statute making it unlawful to "escape" from prison. (People v. Clark, 69 Cal.App. 520 [231 P. 590]; People v. Ah Teung, 92 Cal. 421 [28 P. 577, 15 L.R.A. 190].) These cases, however, deal with situations where a person has been confined either without any authority at all or where the judgment was void on its face. But where the imprisonment is made under authority of law and the process is simply irregular in form, or the statute under which he is confined is unconstitutional, the escape is unlawful. (People v. Ah Teung, 92 Cal. 421 [28 P. 577, 15 L.R.A. 190]; People v. Howard, 120 Cal.App. 45 [8 P.2d 176]; People v. Belknap, 137 Cal.App. 366 [30 P.2d 576]; People v. Crider, 76 Cal.App. 101 [244 P. 113]; People v. McPheeley, 92 Cal.App.2d 589 [207 P.2d 651].) This is likewise the general rule in other states. (Kelley v. Meyers, 124 Ore. 322 [263 P. 903, 56 A.L.R. 661]; People v. Hunt, 229 App.Div. 419 [242 N.Y.S. 105]; People v. Hunt, 244 N.Y.S. 790.) It is also the view adopted by the federal courts. (Aderhold v. Soileau, 67 F.2d 259; Giese v. United States, 143 F.2d 633; United States v. Jerome, 130 F.2d 514 (rev. on other grounds 318 U.S. 101); Bayless v. United States, 141 F.2d 578 (cert. den., 322 U.S. 748).) (Many cases are collected and commented upon in annotations in 56 American Law Reports, page 666 and 163 American Law Reports, page 1137.) These cases make sense. To allow prisoners to use force to escape and then to permit the defense that they were unlawfully confined, would create chaos in a prison. In a democracy the right of self help is seldom permitted. Resort to the courts is the normal and traditional method of correcting an unlawful confinement. While some argument can be made that an inmate has a lawful right to escape where his confinement is completely unlawful, because the constitutional right of freedom has been infringed, no one has a lawful right to possess a knife or other dangerous weapon while confined in a prison.
 We think that appellant was lawfully confined in San Quentin. But even if the statutes so providing were unconstitutional, *744 he cannot raise that defense to a prosecution under section 4502 of the Penal Code.
 The judgment and order appealed from are affirmed.
 Bray, J., concurred.
 WARD, J.
 I concur, as held in effect in the main opinion, that any inmate lawfully or unlawfully confined in a state prison does not possess the right "while at such State prison" to possess a dirk or dagger. (Pen. Code,  4502.) In my opinion a discussion of other points is not necessary to decide the merits of this appeal.
