CONSTITUTIONAL LAW - PERSONS ENTITLED TO RAISE CONSTITUTIONAL QUESTIONS. One attacking the validity of an act must show that its enforcement operates as an infringement on the complaining party's constitutional rights; and without such a showing, the validity of an act cannot be questioned.
 COURTS - JURISDICTION - CONSENT OF PARTIES. The supreme court is not bound by the apparent consent of the parties to the exercise of jurisdiction by the court in an action brought under the declaratory judgment act to test the validity of an act of the legislature.
 CONSTITUTIONAL LAW - PERSONS ENTITLED TO RAISE CONSTITUTIONAL QUESTIONS. The fact that a statute directs a county to pay an increased salary to a justice of the peace affords no basis for an attack by the county on the constitutionality of the statute.
 SAME. A county, as such, may not maintain an action to test the validity of a statute providing for an increase in salaries of justices of the peace.
 DECLARATORY JUDGMENTS - NATURE AND GROUNDS - JUSTICIABLE CONTROVERSY. In order to invoke the jurisdiction of the court under the declaratory judgment act, there must be an actual, justiciable controversy between parties having opposing interests, which must be direct and substantial and involve an actual, as distinguished from a possible, potential, or contingent dispute.
 SAME - ADVISORY OPINIONS. The supreme court will not render a purely advisory opinion in a declaratory judgment action.
Certiorari to review a judgment of the superior court for Kitsap county, No. 34148, Sutton, J., entered December 27, 1954, upon findings in favor of the defendants, in an action under the declaratory judgment act to test the validity of a statute. Reversed.
«1» Reported in 281 P. (2d) 841.
 See 87 A. L. R. 1213; 16 Am. Jur. 282.
Mar. 1955] KITSAP COUNTY v. BREMERTON. 363
John C. Merkel, Ronald Moore, Jerome Walstead, and Willard H. Walker, for plaintiff and relator.
Ronald E. Danielson and Roberta Osborn, for defendants.
DONWORTH, J. -
Kitsap county (hereinafter referred to as relator) commenced this action under the declaratory judgment act to test the validity of chapter 74, Laws of 1951, p. 210, and certain sections of chapter 156, Laws of 1951, p. 430. The complaint joined as defendants the city of Bremerton (hereinafter referred to as Bremerton) and two attorneys (hereinafter referred to as defendants), who had been elected in the 1954 general election to serve as justices of the peace in Bremerton for a period of four years commencing January 10, 1955. Bremerton is a first-class city with a population in excess of twenty thousand and is located within the above-mentioned county.
The complaint alleges that the jurisdiction of the court is based upon the ground that chapter 74, Laws of 1951, and chapter 156, Laws of 1951, are unconstitutional as violative of certain provisions of the state constitution; that if these acts are valid they "will result in large and unnecessary expenses to the plaintiff." Paragraph VIII reads as follows:
"That a justiciable controversy has arisen between the parties to this action regarding their rights and duties under said laws hereinbefore referred to; the plaintiff contending that said laws are unconstitutional and void as hereinbefore alleged, and that the rights and duties of the parties are fixed and determined by the laws in effect prior thereto and that justices of the peace need not be lawyers and that they need not devote their full time to their office. On the other hand, the defendants, Ronald E. Danielson and Roberta Osborn, contend that said laws are constitutional and that the rights and duties of the parties are fixed and determined thereby. That the contention of the defendant city is not known but it is joined as a party defendant because it is required by Chapter 156, Laws of 1951 Section 4, (RCW 3.16.004) to fix the salary of the justice of the peace whom it appoints its police or municipal judge.
Paragraph IX of the complaint further states:
"Plaintiff alleges that the questions here involved are of
364 KITSAP COUNTY v. BREMERTON. [46 Wn. (2d)
great public interest, affecting ten counties, ten first-class cities and over twenty justices of the peace. That many justices who are lawyers and who are taking office in 1955 are uncertain as to whether they must retire from private practice and are put to considerable financial loss if they guess wrong.
"WHEREFORE, plaintiff prays:
"1. That in the exercise of its jurisdiction under the Uniform Declaratory Judgment Act the court make a declaration and determination of the rights, liabilities, duties, responsibilities and legal relations of the parties, and that the judgment or decree herein contain a determination or declaration of the invalidity of the Laws of the State of Washington mentioned hereinbefore, and that it be declared and determined that justices of the peace need not be attorneys, and need not devote their full time to their office; and that their rights and duties are fixed by the laws in force but for the enactment of Chapter 74, Laws of 1951, and Chapter 156, Laws of 1951, . . ."
To this complaint Bremerton and defendants separately answered and cross-complained, the latter denying that the acts referred to in the complaint were unconstitutional except certain sections thereof which are not involved in this case. After a trial on an agreed statement of facts, the court concluded that certain portions of chapter 156, Laws of 1951, had been held unconstitutional by this court in Manus v. Snohomish County Justice Court Dist. Committee, 44 Wn. (2d) 893, 271 P. (2d) 707, and State ex rel. Kurtz v. Pratt, 45 Wn. (2d) 151, 273 P. (2d) 516, and that chapter 74 and the remaining sections of chapter 156, Laws of 1951, were constitutional and valid. Judgment was entered accordingly.
All three parties, by written stipulation, requested this court to issue a writ of certiorari to review the declaratory judgment entered by the trial court. This was done. Bremerton has not appeared or participated otherwise in the proceedings in this court. Relator and defendants filed their briefs in this court and orally argued the cause.
Relator's position, briefly stated, appears to be that § 4, chapter 156, Laws of 1951, increases the salaries of the defendants as justices of the peace from twelve hundred dollars
Mar. 1955] KITSAP COUNTY v. BREMERTON. 365
per annum to fifty-four hundred dollars per annum (and authorizes the county commissioners in cities of the first class to further increase such salary to any sum not exceeding sixty-five hundred dollars), that such increases represent added expense to the county, and that, therefore, Kitsap county can challenge the validity of that section. Then, claiming that § 4 and § 2 (which require justices of the peace to be attorneys at law), are not severable, relator asserts its right to attack the validity of § 2. Practically all of relator's brief is devoted to argument attacking the validity of § 2 and of chapter 74, Laws of 1951.
For reasons stated below, we are convinced (a) that Kitsap county has no standing to question the validity of § 4, chapter 156, Laws of 1951, and (b) that there is no justiciable controversy between the parties. It necessarily follows then that relator may not attack § 2, chapter 156, Laws of 1951, or chapter 74, Laws of 1951.
Chapter 74, Laws of 1951, provides:
"In all cities having a population of five thousand or more, the justices of the peace shall be attorneys at law, duly admitted to practice in the supreme court of the state."
Section 2, chapter 156, Laws of 1951, provides:
"Justices of the peace in such cities [having a population of 5,000 or more] shall be attorneys at law duly admitted to practice in this state."
Section 4, chapter 156, Laws of 1951, provides:
"In cities having a population of more than 20,000, the justices of the peace shall devote their full time to the duties of the office and receive a salary of five thousand four hundred dollars per annum: Provided, That in cities of the first class the county commissioners shall have the power to raise the salaries of justices of the peace to an amount not to exceed six thousand five hundred dollars per annum: Provided further, That where justices of the peace in cities over the population of 20,000 are also acting as police judges their salaries shall be fixed by the legislative body of the city, three thousand dollars of which shall be charged against the counties and the remainder shall be paid by the municipality."
366 KITSAP COUNTY v. BREMERTON. [46 Wn. (2d)
Article 4, § 10, of the state constitution (as amended in 1952 by the twenty-eighth amendment) reads, in part, as follows:
". . . In incorporated cities or towns having more than five thousand inhabitants, the justices of the peace shall receive such salary as may be provided by law, . . ."
We now consider the right of relator to attack § 4, chapter 156, Laws of 1951, on the theory that the increase in salaries of the defendants as justices of the peace in Bremerton "will result in large and unnecessary expenses" to relator.
[1, 2] Nowhere in the entire record do we find any challenge to the relator's right to maintain this action. It is elementary that one attacking the validity of an act must show that its enforcement operates as an infringement on the complaining party's constitutional rights. Acme Finance Co. v. Huse, 192 Wash. 96, 73 P. (2d) 341, 114 A. L. R. 1345. Without such a showing, the validity of an act cannot be questioned. This court is not bound by the apparent consent of the parties (or the failure of the defendants to object)to the exercise of jurisdiction by the court in an action brought under the declaratory judgment act to test the validity of an act of the legislature. Adams v. Walla Walla, 196 Wash. 268, 82 P. (2d) 584.
 We are unable to conceive of any situation wherein the enforcement of the above-quoted section operates as an infringement upon any constitutional right of relator. The fact that the legislature has directed the county to pay an increased salary to a justice of the peace affords no basis for an attack on the constitutionality of chapter 156. None of the provisions of the state constitution mentioned in the complaint forbid such action by the legislature.
 Nor do we find any authority to support the proposition that a county, as such, may maintain an action to test the validity of such an act of the legislature. Authority to the contrary effect is found in Scott County v. Johnson, 209 Iowa 213, 222 N. W. 378, wherein the Iowa court quoted with approval its earlier case of Iowa Life Ins. Co. v. Board of Supervisors, 190 Iowa 777, 180 N. W. 721, as follows:
Mar. 1955] KITSAP COUNTY v. BREMERTON. 367
"`This brings us to a crucial point which has been inadvertently overlooked by the parties. The attack upon these sections of the statute is made by the defendant county. It is not a taxpayer. It has never suffered discrimination by the operation of either or both of these sections. It never can suffer discrimination thereby. It is a mere collector of taxes thereunder, and perhaps a beneficiary thereof. The only power conferred upon it to collect or to receive taxes is conferred upon it by the very sections under attack and their co-ordinate sections. What does it avail the defendant to show the variance of the statutes as a ground of unconstitutionality, and thereby to destroy its own power to collect taxes at all? In other words, what standing has it to denounce an act of the legislature as unconstitutional, by the operation of which it has never been hurt, and never can be?The rule is well settled that a litigant may not attack a statute as unconstitutional unless he can show that its enforcement would be an infringement upon his rights. The constitutionality of a statute cannot be questioned by one who is not prejudiced by its enforcement. Brown v. Smart, 145 U. S. 454; Walsh v. Columbus H. V. & A. R. Co., 176 U. S. 469. The authorities on this proposition are abundant and uniform. A collection of them may be found in 6 Ruling Case Law, under Sections 87 and 88 (page 90). Based upon these authorities, the text states the rule as follows:
"`"87. Before a law can be attacked by any person on the ground that it is unconstitutional, he must show that he has an interest in the question, in that the enforcement of the law would be an infringement on his rights. One who is not prejudiced by the enforcement of an act of the legislature cannot question its constitutionality or obtain a decision as to its invalidity on the ground that it impairs the rights of others. It has been said that courts cannot pass on the question of the constitutionality of a statute abstractly, but only as it applies and is sought to be enforced in the government of a particular case before the court; for the power to revoke or repeal a statute is not judicial in its character. * * *
"`"88. Where the class which includes the party complaining is in no wise prejudiced, the general rule is that it is immaterial whether a law discriminates against other classes, or denies to other persons equal protection of the laws."
"`The conclusion is unavoidable that the defendant county has no standing to attack the constitutionality of these statutes. We have no occasion, therefore, to consider the
368 KITSAP COUNTY v. BREMERTON. [46 Wn. (2d)
question of statutory classification which is presented to us in the briefs.'"
In State ex rel. Board of Com'rs v. Clausen, 95 Wash. 214, 163 Pac. 744, this court discussed the standing of a county to question a liability imposed upon it by the legislature, saying:
"In discussing these different constitutional objections, we shall not attempt to segregate them, but, inasmuch as the questions submitted call for a general treatment of the constitutional phases of state and county government and the powers and duties that the state may impose upon a county, we shall treat them together, endeavoring in the discussion as a whole to cover every phase of the question. To do this, it will be helpful to start out with a clear understanding of the nature of county government and the relation of the county government to the state.
"Our constitution makes no special reference to county organizations as such other than to recognize them as legal subdivisions of the state, recognizing those counties existing at the time of the adoption of the constitution and providing for the organization of new counties by the legislature under certain restrictions. As local subdivisions of the state, counties are created by the sovereign power of the state of its own sovereign will without any necessary particular solicitation, consent or concurrent action by the people who inhabit them. They are created by the state under its sovereign and paramount authority with a view to the policy of the state at large, for political organization, and the administration of governmental affairs. With scarcely an exception, all the powers and functions of county organizations have a direct and exclusive reference to the general policy of the state and are, in fact, but a branch of the general administration of that policy. Commissioners of Hamilton County v. Mighels, 7 Ohio St. 109; People ex rel. Deneen v. Martin, 178 Ill. 611, 53 N. E. 309; County Com'rs Talbot County v. County Com'rs Queen Anne's County, 50 Md. 245; 1 Dillon, Municipal Corporations (5th ed.), § 34. This being so, it would seem to follow as a natural sequence that legislative authority over counties is unlimited except as that limitation is found in the state constitution."
See, also, In re Salary of Superior Court Judges, 82 Wash. 623, 144 Pac. 929; Wheeler School Dist. v. Hawley, 18 Wn. (2d) 37, 137 P. (2d) 1010.
Mar. 1955] KITSAP COUNTY v. BREMERTON. 369
Since we have concluded that enforcement of § 4, chapter 156, Laws of 1951, does not result in the infringement of relator's constitutional rights (assuming that it has any such rights), it follows that the trial court did not have jurisdiction to entertain the cause on the ground that the two acts of 1951 involved in this case were alleged to be unconstitutional.
Next we will consider whether there exists in this case a justiciable controversy between the parties sufficient to give the court jurisdiction either under the declaratory judgment act or otherwise.
 Despite the allegations contained in Paragraph VIII of the complaint, quoted above, we do not agree that there exists a justiciable controversy between the parties.
"This court has many times held that, in order to invoke the jurisdiction of the court under the declaratory judgment act, there must be an actual, existing justiciable controversy between parties having opposing interests, which interests must be direct and substantial and involve an actual, as distinguished from a possible, potential, or contingent dispute. [Citing cases.]" Kahin v. Lewis, 42 Wn. (2d) 897, 259 P. (2d) 420.
As stated above, most of the argument made in the briefs relates to the validity of § 2, chapter 156, Laws of 1951. It is quite apparent that the principal object of both parties in instituting and conducting this suit was to obtain an adjudication as to the validity of that section. This same question was submitted to a Department of this court in State ex rel. Bullock v. Stone, 45 Wn. (2d) 891, 273 P. (2d) 892, but could not then be decided because the judges who heard the case were not unanimous in their views. Before that case could be heard En Banc, the issues involved had become moot because of the result of the primary election held on September 14, 1954. Thereafter, the writ of certiorari was quashed.
This proceeding does not involve a justiciable controversy between the parties as to the validity of § 2, or § 4, of chapter 156, Laws of 1951. We therefore must decline to pass upon the question of the validity of either section or of chapter 74,
370 BROWN v. BROWN. [46 Wn. (2d)
Laws of 1951, although we recognize that, as pointed out by the parties, this question is of great public interest.
 To decide these questions on the record before us would result in rendering a purely advisory opinion, which we will not do in a declamatory judgment action. Seattle-First Nat. Bank v. Crosby, 42 Wn. (2d) 234, 254 P. (2d) 732.
The judgment is reversed, and the cause is remanded to the superior court with directions to enter a judgment dismissing the action.