
102 Cal.App.2d 198 (1951)
LOYAL H. CLARK, Appellant,
v.
CITY OF PASADENA et al., Respondents.
California Court of Appeals. 
Feb. 8, 1951.
 J. H. Morris and Walter H. Duane for Appellant.
 H. Burton Noble, City Attorney, Frank L. Kostlan, Assistant City Attorney, and Robert E. Michalski, Deputy City Attorney, for Respondents.
 WILSON, J.
 By this appeal we are required to construe portions of the charter of the city of Pasadena relating to pensions of retired members of the police department. *200
 Petitioner is a police officer of the city of Pasadena. He filed with the retirement board an application for retirement upon the pension to which he claims he is entitled under the provisions of the city charter adopted in 1919. Upon denial of his application he filed in the superior court a petition for a writ of mandate to compel the board to comply with his demand. Defendants answered and pleaded as a defense that he is entitled to such benefits, if any, as are provided in amendments to the city charter adopted in 1935 and 1947. On defendants' motion judgment on the pleadings was entered in their favor from which petitioner has appealed.
 [1] The answer cannot be considered on the motion for judgment on the pleadings. Such motion must be determined on the same principles as if it were a demurrer to the complaint on the same ground. (Douglass v. Dahm, 101 Cal.App.2d 125, 128 [224 P.2d 914, 916].) [2] However, since a freeholders' charter is a public statute (Adams v. Wolff, 84 Cal.App.2d 435, 440 [190 P.2d 665]; Leahey v. Department of Water & Power, 76 Cal.App.2d 281, 286 [73 P.2d 69]) of which the court takes judicial notice (Code Civ. Proc.,  1875(3); Thompson v. Los Angeles, 82 Cal.App.2d 45, 47 [185 P.2d 393]; Teachout v. Bogy, 175 Cal. 481, 485 [166 P. 319]), the same defense is available without recognition of the allegations in the answer.
 In October, 1925, petitioner became and at all times since has been an employee of the police department in good standing; he was 56 years of age at the time his petition for retirement was filed; since 1939 he has held the rank of detective and for more than one year prior to his application for retirement his monthly salary had been $359.55. Having been a member of the police department for more than 20 years and having reached the age of 56 years he asserts the right, pursuant to subsection (d) of section 11 added to article 6 of the city charter in 1919  [fn. 1] (Stats. 1919, pp. 1505, 1506), to be retired upon a monthly pension of $179.77, one half of the salary he had received for the preceding year.
 Defendants maintain that the amendments to the charter *201 adopted in 1935 and 1947 are the guide to be followed in fixing retirement allowances for police officers and that those amendments repealed the 1919 amendment which included subsection (d) of section 11 of article 6, while petitioner contends that the latter provision is still in force by reason of the fact that the 1935 and 1947 amendments are void for uncertainty.
 [3] By an amendment to the city charter in 1935 article 6, entitled "Police and Fire Departments and Retirement System," was revised and amended. (Stats. 1935, p. 2321.) Subsection (a) of section 14 (p. 2328) provided: "Members of the Retirement system may retire for service at their option upon attaining an age of at least fifty-seven years if they be members of the Fire Department, or sixty years if they be members of the Police Department, but only after rendering at least twenty years of service to the city in either or both of said departments ..." By subsection (d)  [fn. 2] of section 14 (p. 2332) the retirement compensation was changed from an amount equal to one half of the amount of salary attached to the rank or position held by the retiring member *202 for a period of one year next preceding the date of retirement to approximately one half of the member's final compensation. The term "final compensation" is defined in section 10 of article 6 (p. 2326) as "the average monthly compensation earnable by a member during the ten years immediately preceding his retirement, or death before retirement."
 Subsection (b)  [fn. 3] of section 14 of article 6 (pp. 2328-9) provides the formula for computing the retirement allowance. Upon a casual first reading of subsection (b) it might appear to have been drafted by an advanced student of obscurantism but upon a close examination and analysis it is not so vague and uncertain as not to be understandable and interpretable with reasonable definiteness, although there is much to be desired in precision of expression and its clarity could be greatly improved upon.
 It is agreed that the charter amendments of 1935 became effective on July 1 of that year. Prior thereto members of the fire and police departments did not contribute to the retirement fund, the city having contributed the entire amount. The formula for computation of the retirement allowance is composed of two parts. Since under the amendment a member of the retirement system and the city contribute equal amounts to the retirement fund it is clear that the first part of the formula refers to the total of the amounts so contributed by the member and the city (or twice the sum contributed by the member), plus accumulated interest, to be computed upon the basis of actuarial tables and rates approved by the retirement board. Actuarial tables, rates and valuations are provided for in section 9 (p. 2325). *203
 The second or "other part" of the formula is based on the member's service previous to July 1, 1935, commonly referred to as "prior service." With reference to such "other part" it is provided in subdivision (b) of section 14, as amended in 1935 (footnote 3), that the retiring member shall receive "the same percentage of his final compensation for each year of service rendered by him ... prior to [July 1, 1935] as the [combined] contributions of the member and the city are calculated to provide upon retirement ... at ... sixty years of age. ... "Final compensation," as heretofore stated, is the member's "average monthly compensation ... during the ten years immediately preceding his retirement." Since the retiring member is to receive "one-half of his final compensation" which is based on his "average" monthly compensation for the next preceding 10 years (see subsection (d) of section 14, as amended in 1935, footnote 2), one half or 50 per cent is employed as the basis of calculation. The percentage to be used for the purpose of determining the retirement allowance is calculated at the beginning of the member's membership in the retirement system by dividing 50 per cent by the total number of years which the member will be required to serve in order to be eligible for retirement at the age of 60 years for a policeman. When the quotient resulting from such computation is multiplied by the number of years of the member's service prior to July 1, 1935, the product ensuing will represent the portion of the member's retirement allowance to which he is entitled by reason of such "prior service." This analysis of the method of computation provided in the charter may be illustrated by an example. If a member of the police department has had five years of service prior to July 1, 1935, and 15 years thereafter, and has attained the age of 60 years, he is eligible for retirement. The second or "other part" of his retirement allowance is computed in this manner: Fifty per cent divided by 20 years of service will yield a quotient of 2.5 per cent. Assuming the member's "final compensation" as above defined amounts to $300 a month, such sum multiplied by 2.5 per cent will result in a product of $7.50. Multiplying that sum by the member's five years of prior service amounts to $37.50, which is the amount per month which the member will receive as the second or "other part" of his retirement allowance."
 [4] By an amendment to the charter approved by the *204 Legislature in 1947 subsection (a)  [fn. 4] of section 14 of article 6 was amended (Stats. 1947, p. 3487) so as to give members of the retirement system the option of retiring at the age of 51 after having rendered at least 20 years of service but reducing the retirement allowance which he would have received if he had remained in the service until the normal retirement age had been reached--57 for firemen and 60 for policemen.
 We find no ambiguity or uncertainty in this provision. If a member of the retirement system remains in service for the normal period he will receive a retirement allowance computed as hereinbefore described, but if he chooses to retire at the age of 51 after 20 years of service his retirement allowance is proportionately decreased. If one member of the retirement system remains in service until he reaches the age of 60 and another retires at 51 it is assumed that the latter will draw his retirement allowance for a greater number of years than the former; hence the total amount of the monthly allowances received by the 60-year-old man with a shorter expectancy will be approximately equal to that of the 51-year-old member with a longer expectancy.
 From the foregoing discussion it becomes patent that the provisions of the city charter here under consideration are not, as contended by appellant, so vague, uncertain and indefinite as not to be understandable or to be incapable of enforcement, nor do they leave to a ministerial officer the duty or power to define the rights of members of the retirement system. In order to provide a fair and equitable method of computing retirement allowances for policemen and firemen, having in view the fact that many of them had served in their respective departments prior to July 1, 1935, during which time the city was providing the entire amount of the *205 retirement fund, and they, with those who came into service after that date, were required by the charter amendment of 1935 to contribute to the fund thereafter, it was essential to establish a formula that would apply justly to both groups. Those with so-called "prior service," not having contributed to the retirement fund previously to July 1, 1935, were of necessity treated in a manner that would be fair to them and not unfair to the members who came into the employment of the city after that date and were required to and did contribute to the fund from the beginning of their service. The fund is not depleted to the benefit of the older members and to the detriment of interests of the newer ones.
 [5] That there were difficulties in setting up such a formula is manifest, but if a practicable interpretation of the charter amendments can be found the court must adopt it and sustain the enactment. [6] A statute will not be stricken down for uncertainty if a reasonable and usable construction can be given to its language and it will not be rendered nugatory by the fact that there may be difficulty in ascertaining its meaning or by the possibility of different interpretations. (County of Tulare v. City of Dinuba, 188 Cal. 664, 677-8 [206 P. 983].) [7] All presumptions and intendments are in favor of the constitutionality of a statute and all doubts are resolved in favor of its validity and not against it. (Jersey Maid Milk Products Co. v. Brock, 13 Cal.2d 620, 636 [91 P.2d 577]; People v. Southern Pac. Co., 209 Cal. 578, 593-4 [290 P. 25]; County of Los Angeles v. Legg, 5 Cal.2d 349, 353 [55 P.2d 206]; 16 C.J.S., p. 234,  98; 12 C.J., p. 787,  220.)
 "A statute is not necessarily void because it is vague, indefinite, or uncertain ... or because the intention of the legislature might have been expressed in plainer terms, ... and opinions may differ in respect of what falls within its terms. ... A statute will not be declared void for vagueness and uncertainty where the meaning thereof may be implied. ..." (50 Am.Jur., pp. 489, 490, "Statutes,"  473.)
 Not only are the charter provisions under discussion capable of clear and understandable construction but subsection (b) has been interpreted and administered by the appropriate authorities since 1935 and subsection (a) as it now reads since 1947. Such interpretation appears to have been satisfactory to the members of the retirement system since no previous attack has been made upon the validity of the provisions that are in question in this proceeding. *206
 Since the 1935 and 1947 amendments are valid and at the time petitioner filed his application for retirement were in force and effect, superseding the amendments of 1919 pursuant to which petitioner had proceeded, respondents were correct in denying his application.
 Judgment affirmed.
 Moore, P. J., and McComb, J., concurred.
 (Clause "n" referred to in subsection (d) above provides that the members of the Police Department who are entitled to retire pursuant to section 11 of article 6 "include the Chief, subordinate officers, patrolmen, and all persons duly and regularly appointed therein whose duty it is to preserve the peace to prevent injury to life and property or to suppress crime and disorder in the City of Pasadena ..." (Stats. 1919, pp. 1508-1509.))
 "Upon retirement for service, a member shall receive a retirement allowance composed of the sum of two parts; one part being an amount derived by the application, upon the basis of tables and rates recommended by the actuary and approved by the Retirement Board, as provided in Section 9 of this Article, of twice the normal contributions plus accumulated interest thereon, made by him and standing to his credit under the Retirement System, at the date of his retirement, and the other part, regardless of his age at retirement, being the same percentage of his final compensation for each year of service rendered by him in the Fire or Police Department prior to the effective date hereof, as the contributions of the member and the city are calculated to provide upon retirement for service at fifty-seven years of age if he be a member of the Fire Department, or sixty years of age if he be a member of the Police Department, or upon completion of twenty years of service at an age higher than fifty-seven years if he is a member of the Fire Department or sixty years if he be a member of the Police Department, for each year of service after said date ..."
 "Members of the Retirement System may retire for service at their option upon attaining age fifty-one but only after rendering at least twenty years of service. Upon such retirement, a member shall receive a retirement allowance calculated as provided in subsection (b) of this section, except that if a member retires before attaining age fifty-seven if he be a member of the Fire Department or age sixty if he be a member of the Police Department, that part of his retirement allowance provided because of service rendered prior to July 1, 1935, shall be reduced to that amount which the value at his retirement of such part of his retirement allowance deferred to age fifty-seven or sixty, depending on the respective department of which he is a member, will provide at his age at the time of such retirement. Any provision of subsection (b) of this section inconsistent with the sentence immediately preceding is hereby superseded for the purpose of interpreting said sentence."
NOTES
[fn. 1]  1. Subsection (d), 1919 amendment: "Whenever any member of either [Police or Fire] Department, as defined in clause 'n' hereof shall have served twenty (20) years or more in the aggregate in any capacity or rank whatever therein, and shall have attained the age of fifty-five (55) years, said Board may, upon his written request, or without such request if it be deemed for the good of the department where he serves, order and direct that such member be retired from further service in the department. From the date of making such order, or from the date such order becomes effective, the services of such member in the department shall cease and such member so retired shall thereafter during his lifetime, be paid a yearly pension equal to one-half the amount of the salary attached to the rank or position which he may have held in said department for the period of one year next preceding the date of such retirement. Such pension shall be payable in equal monthly installments ..."
[fn. 2]  2. Subsection (d), 1935 amendment: "The normal contribution which shall be required as a deduction from the compensation of each member throughout his membership shall be such as, on the average for such member, if his service on full salary be uninterrupted and when accumulated with interest, added to the equal accumulated contributions of the city and applied according to the tables and rates recommended by the actuary and approved by the Retirement Board as hereinbefore provided, will provide a retirement allowance upon retirement for service at the age of fifty-seven years if he be a member of the Fire Department or sixty years if he be a member of the Police Department, or upon completion of twenty years of service at an age higher than fifty-seven years if he be a member of the Fire Department or sixty years if he be a member of the Police Department, equal to one-half of his final compensation, less that part of the retirement allowance set forth in the first sentence of subsection (b) of this Section 14, which is to be provided by contributions of the city on account of service rendered prior to the effective date hereof."
[fn. 3]  3. The pertinent part of subsection (b), 1935 amendment, reads:
[fn. 4]  4. The applicable part of subsection (a), 1947 amendment, reads:
