
604 N.W.2d 666 (2000)
STATE of Iowa, Appellee,
v.
Robert GILLILAND, Appellant.
No. 98-1567.
Supreme Court of Iowa.
January 20, 2000.
Linda Del Gallo, State Appellate Defender, and Robert P. Ranschau, Assistant State Appellate Defender, for appellant.
Thomas J. Miller, Attorney General, Bridget A. Chambers, Assistant Attorney General, and John P. Sarcone, County Attorney, for appellee.
Considered by LARSON, P.J., and LAVORATO, SNELL, and CADY, JJ., and HARRIS,[*] S.J.
SNELL, Justice.
Defendant, Robert Gilliland, age seventeen, was charged in adult court with two counts of first-degree robbery in violation of Iowa Code sections 711.1 and 711.2 (1997). Prior to trial the state dismissed one of the counts. A jury found Gilliland guilty of the lesser included offense of second-degree robbery in violation of sections 711.1 and 711.3.
The court sentenced Gilliland to an indeterminate term of imprisonment not to exceed ten years. Under Iowa Code sections 902.12 (prescribing a minimum sentence for certain felonies) and 903A.2 (allowing a reduction of sentences for good conduct), Gilliland must serve eighty-five percent of his sentence before becoming eligible for parole. During sentencing, the court noted that it had no discretion as to sentencing options. It stated that it could not challenge the legislature's mandate that if a person is found guilty of the forcible felony of second-degree robbery, it must impose a ten-year indeterminate sentence. Gilliland appeals this sentence which we now affirm.
Gilliland contends the court abused its discretion with respect to its failure to consider granting a deferred judgment pursuant to Iowa Code section 232.8(3) which states in pertinent part:
The juvenile court, after a hearing and in accordance with the provisions of section 232.54, may waive jurisdiction of a child alleged to have committed a public offense so that the child may be prosecuted as an adult or youthful offender for such offense in another court. If the child, except a child being prosecuted as a youthful offender, pleads guilty or is found guilty of a public offense in another court of this state that court may, with the consent of the child, defer judgment and without regard to restrictions placed upon deferred judgments for adults, place the child on probation for a *667 period not less than one year upon such conditions as it may require.
To further support the argument that a deferred judgment should be considered by the trial court, Gilliland cites Iowa Code section 232.8(1)(c) which states in pertinent part:
Violations by a child, age sixteen or older, which constitute a forcible felony are excluded from the jurisdiction of the juvenile court and shall be prosecuted as otherwise provided by law unless the court transfers jurisdiction of the child to the juvenile court upon motion and for good cause. A child over whom jurisdiction has not been transferred to the juvenile court, and who is convicted of a violation excluded from the jurisdiction of the juvenile court under this paragraph, shall be sentenced pursuant to section ... 902.9....
The issue presented is one of statutory construction. Our review is for correction of errors at law. Iowa R.App. P. 4.; State v. Thomas, 547 N.W.2d 223, 225 (Iowa 1996).
We have said that when a sentence is not mandatory, the district court must exercise its discretion in determining what sentence to impose. State v. Berney, 378 N.W.2d 915, 920 (Iowa 1985). Gilliland argues that under these statutes the sentence is not mandatory and that the statutory restrictions on prohibiting deferred judgments for adults do not apply to a juvenile convicted of a forcible felony.
The problem encountered by Gilliland in this argument is that the statutory language does not support the argument. The legislature has clearly denied courts the authority generally, to grant a deferred judgment for a forcible felony. An exception to that rule exists for juveniles charged in juvenile court and then waived to district court by the juvenile court. The legislature did not extend this exception to juveniles charged with a crime over which the district court has original jurisdiction.
Gilliland was charged with an offense over which the district court had original jurisdiction. See Iowa Code §§ 602.6202, 602.7101. For this reason, jurisdiction was never waived from the juvenile court. In contrast, see State v. Greiman, 344 N.W.2d 249, 252-53 (Iowa 1984), where an earlier version of Iowa Code section 232.8(3) did not exclude forcible felonies from those offenses eligible for a deferred sentence. The court in Greiman concluded that a deferred judgment could be granted a defendant convicted of a forcible felony.
Gilliland was seventeen at the time he committed the forcible felony. He was charged in adult court for a forcible felony over which the juvenile court is excluded from jurisdiction by Iowa Code section 232.8(1)(c). No hearing was held in district court regarding transferring the case to juvenile court. See Iowa Code § 803.6.
The plain language of the statutes negates a basis of support for the argument advanced by Gilliland. The district court was correct in its interpretation of the statutory law as set by the legislature.
The judgment of the district court is affirmed.
AFFIRMED.
NOTES
[*]  Senior judge assigned by order pursuant to Iowa Code section 602.9206 (1999).
