Ah, the Mitsubishi J2M Raiden. As to how it flew, some say the final models tested in the US flew rather well. Unfortunately for Japan, it took them most of the war to reach that point, so for most of the war this plane was in various phases of testing and experimentation. When they finally got it how they wanted it, they had time to build a bit less than 500 in total.
As for guns, the production models were like this:
J2M2 and J2M6: 2x7.7mm Type 97 in the nose, 2x20mm Type 99-1 in the wings.
J2M3, J2M5, and J2M6a: 2x20mm Type 99-1and 2x20mm Type 99-2, all in the wings.
J2M3a: 4x20mm Type 99-2 in the wings.
Supposedly, a few M3s and the M4s had 2x30mm Type 2, and some M5s had 2x30mm Type 5.
For details on the guns...
7.7mm Type 97: basically a copy of the Brti Vickers class E shooting a copy of the Italian version of the Brit .303 ammo (same guns as in Zeke A6M2).
20mm Type 99-1: copy of Oerlikon FF F, basically the same as the German MG/FF (same guns as in Zeke A6M2).
20mm Type 99-2: copy of the bigger, high-velocity version of the Oerlikon FF, the FF L. Ammo not interchangeable with 99-1 (same guns as used by the nikki).