While I know that many Japanese soldiers died in a suicidal Banzai charge and others simply committed suicide, prisoners were still taken. Did any Japanese generals surrender?
The most prominent example I can think of at the top of my head was Tomoyuki Yamashita. He surrendered in the Philippines at the end of WW2, and was hanged for war crimes in 1946. JisaburÅ Ozawa (granted he was an admiral, not a general) surrendered, as did Takeo Kurita.
If you're asking about garrison commanders on islands that the Americans attacked, they did have a habit of killing themselves when they lost. I know that the Japanese commanders on Okinawa, Iwo Jima, Peleliu, Saipan, Guam, Tinian, Kwajalein and Tarawa all died in action or committed suicide.