
660 So.2d 1083 (1995)
Roderick L. STACEY, Appellant,
v.
STATE of Florida, Appellee.
No. 94-2181.
District Court of Appeal of Florida, Fifth District.
August 18, 1995.
Rehearing Denied October 3, 1995.
James B. Gibson, Public Defender, and Susan A. Fagan, Asst. Public Defender, Daytona Beach, for appellant.
Robert A. Butterworth, Atty. Gen., Tallahassee, and Barbara Arlene Fink, Asst. Atty. Gen., Daytona Beach, for appellee.
GRIFFIN, Judge.
The defendant, Roderick L. Stacey ["Stacey"], entered into a written negotiated plea of guilty in Case No. 94-3924 to one count of robbery with a firearm or destructive device in exchange for the state's agreement to nol pros a second count of the same crime and not to seek habitual offender treatment. In the second case (94-3933), he was charged with two counts of robbery with a deadly weapon. He entered a similarly structured plea in that case, i.e. pleading guilty to one *1084 count of robbery with a deadly weapon with a nol pros of the second. The charges in 94-3924 carried a minimum mandatory sentence, the charges in 94-3933 did not. At the sentencing, the court erroneously announced its judgment of guilt of "robbery with a deadly weapon" in both cases. Four days later, the court called the defendant back to correct its error. At that time, it was discussed that the charge to which Stacey had pled guilty in 94-3924 did carry a minimum mandatory; hence, in addition to correctly adjudicating the defendant guilty of the crime with which he was charged and to which he plead guilty (robbery with a firearm or destructive device), the minimum mandatory was imposed. The record is clear that the defense recognized Stacey had pled to a crime that carried a minimum mandatory. In fact, defense counsel alluded to the prosecution's "potential" to stack the minimum mandatories in the absence of the plea agreement.
On appeal, Stacey urges that the plea colloquy was insufficient to establish that he was carrying a firearm or destructive device. Stacey seeks to have the firearm minimum mandatory stricken by us or, at least, to have the matter remanded to the lower court to establish whether he was carrying a firearm or destructive device. He relies on Koenig v. State, 597 So.2d 256 (Fla. 1992) and Anfield v. State, 615 So.2d 853 (Fla. 2d DCA 1993). Koenig, however, involves the withdrawal of a plea based on an inadequate plea colloquy. Stacey has not sought to withdraw his plea. The sole purpose for the procedural requirement that the court must ascertain that there is a factual basis for the plea is to avoid mistake and is subject to the requirement that the defendant must show he has, in fact, been prejudiced by any defect. Williams v. State, 316 So.2d 267, 271-274 (Fla. 1975). Here the defendant has made no such showing. Moreover, it was an express condition of Stacey's plea agreement that he gave up the right to have the prosecutor recite the facts showing his guilt.
Having entered into and stuck with an advantageous, bargained-for plea agreement to the crime of robbery with a firearm, which, as noted on the face of the information, carries a minimum mandatory sentence, the appellant's minimum mandatory sentence stands. The state has no obligation to prove the gun he wielded was powered by explosives rather than air.
AFFIRMED.
DAUKSCH, J., concurs.
W. SHARP, J., dissents with opinion.
SHARP, Judge, dissenting.
I would affirm, but strike the three-year minimum mandatory portion of the sentence in Case No. 94-3924.
Stacey was originally charged with four separate robbery incidents, in two different cases. In Case No. 94-3924, the State charged him with two counts of robbery with a firearm or destructive device. In Case No. 94-3933, the State charged him with two counts of robbery with a deadly weapon. He pled guilty to one count in each case, pursuant to a plea agreement. The State agreed to nolle prosse the second robbery count in each case; the parties agreed restitution could be reserved for later consideration; the State agreed not to seek a habitual offender sentence; and Stacey agreed to testify truthfully against a codefendant in both cases.
At the plea hearing, the court said there was no minimum mandatory sentence for Case No. 94-3933. But nothing was said about a minimum mandatory sentence in Case No. 94-3924. Also at the plea hearing, Stacey was asked by the court to establish the factual basis for his guilty pleas. He testified that in the first robbery incident, he had used a pellet gun. In the second incident, he admitted helping his co-defendant rob two people, but he denied that he had any weapon. He testified the co-defendant had a gun, but it was not clear this was a firearm or the same pellet gun. The court said it accepted the facts as they had been stated by Stacey. Originally, the court imposed two ten-year sentences on both robbery counts, without any minimum mandatory sentence.
The statute which authorizes imposition of a minimum mandatory sentence, section 775.087(2), provides:

*1085 (2)(a) Any person who is convicted of:
1. Any ... robbery ...
* * * * * *
2... . and who had in his possession a `firearm,' as defined in s. 790.001(6), or `destructive device,' as defined in s. 790.001(4), shall be sentenced to a minimum term of imprisonment of 3 calendar years ...
Section 790.001(6) defines a "firearm" as follows:
`Firearm' means any weapon (including a starter gun) which will, is designed to, or may readily be converted to expel a projectile by the action of an explosive; the frame or receiver of any such weapon; any firearm muffler or firearm silencer; any destructive device; or any machine gun ...
Section 790.001(4) defines a "destructive device" as follows:
`Destructive device' means any bomb, grenade, mine, rocket, missile, pipe bomb, or similar device containing an explosive, incendiary, or poison gas and includes any frangible container filled with an explosive, incendiary, explosive gas, or expanding gas, which is designed or so constructed as to explode by such filler and is capable of causing bodily harm or property damage; any combination of parts either designed or intended for use in converting any device into a destructive device and from which a destructive device may be readily assembled; any device declared a destructive device by the Bureau of Alcohol, Tobacco, and Firearms; any type of weapon which will, is designed to, or may readily be converted to expel a projectile by the action of any explosive and which has a barrel with a bore of one-half inch or more in diameter; and ammunition for such destructive devices, but not including shotgun shells or any other ammunition designed for use in a firearm other than a destructive device. `Destructive device' does not include:
(a) A device which is not designed, redesigned, used, or intended for use as a weapon;
(b) Any device, although originally designed as a weapon, which is redesigned so that it may be used solely as a signaling, line-throwing, safety, or similar device;
(c) Any shotgun other than a short-barreled shotgun; or
(d) Any nonautomatic rifle (other than a short barreled rifle) generally recognized or particularly suitable for use for the hunting of big game.
This court has held that air pellet pistols and pellet rifles may be deadly weapons, depending on the circumstances. Lynn v. State, 567 So.2d 1043 (Fla. 5th DCA 1990); State v. Jeffers, 490 So.2d 968 (Fla. 5th DCA 1986); Duba v. State, 446 So.2d 1167 (Fla. 5th DCA 1984). However, as indicated in Neskovski v. State, 568 So.2d 468 (Fla. 5th DCA 1990), a "gun" is not necessarily a "firearm." To impose the minimum mandatory sentence, the fact-finder must conclude that the defendant had a "firearm," as defined by the statute, in his possession at the time of the crime. As Judge Goshorn wrote in his specially concurring opinion:
There are many types of guns, e.g. water guns, and grease guns; even the use of an antique firearm does not qualify a defendant for a minimum mandatory sentence unless it is used in a statutorily specified way. The determination of whether a gun is a firearm under this statutory definition must be made by a jury.
Neskovski, 568 So.2d at 470.
The key characteristic in the definition of both "firearm" and "destructive device" appears to be "explosive." This term is defined by Section 790.001:
(5) `Explosive' means any chemical compound or mixture that has the property of yielding readily to combustion or oxidation upon application of heat, flame, or shock, including but not limited to dynamite, nitroglycerin, trinitrotoluene, or ammonium nitrate when combined with other ingredients to form an explosive mixture, blasting caps, and detonators, but not including:
(a) Shotgun shells, cartridges, or ammunition for firearms;

*1086 (b) Fireworks as defined in s. 791.01;
(c) Smokeless propellant powder or small arms ammunition primers, if possessed, purchased, sold, transported, or used in compliance with s. 552.241;
(d) Black powder in quantities not to exceed that authorized by chapter 552, or by any rules or regulations promulgated thereunder by the Department of Insurance, when used for, or intended to be used for, the manufacture of target and sporting ammunition or for use in muzzle-loading flint or percussion weapons.
The exclusions contained in paragraphs (a)-(d) do not apply to the term `explosive' as used in the definition of `firearm' in subsection (6).
BB guns and pellet guns expel projectiles through the release of compressed air or gas. See Lynn (pellet pistol and pellet rifles both discharge a pellet through the use of air pressure); In the Interest of W.M., 491 So.2d 1263 (Fla. 4th DCA 1986) (BB and pellet guns typically expel metallic shot, lead or projectiles by operation of air or gas); Duba (air pistol in question was designed to expel small, round metal pellets or shot, commonly known as B.B.'s, by the release of gas from a small container or cartridge of compressed, carbon dioxide gas); Depasquale v. State, 438 So.2d 159 (Fla. 2d DCA 1983) (a BB gun is an air or gas operated gun designed to expel lead or other metallic shot). Accordingly, since they do not employ an explosion caused by combustion or oxidation upon application of heat, flame or shock, they do not meet the statutory definition of firearm or destructive device.
The majority holds, in this case, that Stacey waived any objection to the imposition of the minimum mandatory sentence because he pled guilty to a crime that carries the minimum mandatory sentence and, at his resentencing, he failed to object to it. However, the transcript reveals Stacey had already instructed defense counsel to appeal when the minimum mandatory sentence was added. And there was no discussion at the hearing when his plea was entered that he faced a minimum mandatory sentence. Florida Rule of Criminal Procedure 3.172(c)(1) requires that the trial judge inform a defendant about any minimum mandatory sentence provided by law, prior to accepting a guilty plea.
But even if Stacey waived this point by failing to object at sentencing, or by merely entering into a plea agreement, it is well-established that a trial court cannot impose an illegal sentence as part of a plea bargain. See Cheney v. State, 640 So.2d 103 (Fla. 4th DCA 1994) (a defendant in a plea agreement cannot acquiesce to an illegal sentence); Dyer v. State, 629 So.2d 285 (Fla. 5th DCA 1993) (trial court cannot impose an illegal sentence even if the sentence is pursuant to a valid plea agreement); Stephens v. State, 627 So.2d 543 (Fla. 2d DCA 1993) (defendant did not waive legality of his sentences even though he agreed to them in a plea bargain); Conrey v. State, 624 So.2d 793 (Fla. 5th DCA 1993) (trial court cannot impose an illegal sentence pursuant to a plea bargain); Watkins v. State, 622 So.2d 1148 (Fla. 1st DCA 1993) (fact that defendant agreed to accept an habitual violent felony offender sentence does not preclude review because if the sentence is determined to be illegal, the trial court had no authority to enter it regardless of the plea agreement).[1] Based on the facts established by Stacey at the plea hearing, and accepted as true by the trial judge in this case, application of the minimum mandatory sentence is not authorized by law, and therefore that part of the sentence is illegal, in my view.
NOTES
[1]  However, certain constitutional challenges as to otherwise legal sentences can be waived by a bargained-for plea agreement. See Novaton v. State, 634 So.2d 607 (Fla. 1994) (defendant who knowingly entered into a bargain plea to multiple charges waived otherwise viable double jeopardy objection to those sentences).
