There's enough stuff in the F-35 to get a comedian through a HBO special. The latest guffaw - its gun doesn't shoot. It's there and everything - gun, ammunition, the lot. Pilots just won't be able to fire it for a while, 2019 at the earliest.
But wait, you need a gun for the close support role, the ground-pounding stuff in support of friendly infantry. Oh, I get it. Of course the F-35 with its astronomical price tag and single-engine vulnerability is just too costly and too easily damaged to be exposed to close support missions. And of course it's too slow and short-range to be much use as an interceptor. And it's too slow in speed, turn and climb rate to survive as a dogfighter. And, of course, having just 180 rounds of cannon ammunition is something of an admission that it's not intended for close support or interception or dogfighting. What does that leave? Oh yeah, that's right, it's a bomber.