context: Six months after the Japanese attack on Pearl Harbor, the U.S. Navy still has not fully recovered from the losses it suffered. In April of 1942 the US staged a desperate stopgap measure to bring pressure on Japan by launching Army bombers under the command of James Doolittle from the USS Hornet to bomb Tokyo and other cities. While the raid achieved relatively little in terms of damage, it has sent a wave of panic among Japanese leadership, and the commander of the Combined Fleet, Isoroku Yamamoto, sees it as opportunity to implement a planned attack on the island of Midway, near the Hawaiian Islands, a plan designed to bring out what is left of the US Pacific Fleet and finish it off before American industry (which has long scared Yamamoto given its greater strength over Japan's) can fully commit to rebuilding American strength. The proposed operation encounters resistance from Admiral Nobutake Kondo, who doesn't believe Vice Admiral Chuichi Nagumo can survive another attack by the First Air Fleet's carriers against a target certain to bring out land-based bombers.While the command corps of the Imperial Navy debates Yamamoto's plan, US Navy Captain Matthew Garth, a go-between for the Navy's Pacific command - aka CINCPAC - is consulting Navy intelligence chief Captain Joseph Rochefort, who spends his full time in a dank underground chamber decoding Japanese radio traffic with a staff of assistants. Rochefort has been getting some traffic about an area of interest to the Japanese known only as Objective AF.Garth, meanwhile, has a more personal issue to deal with, as his son, a Navy pilot, has fallen in love with a Japanese girl on Oahu, at the worst possible time given the wholesale internment of Japanese on American soil.Rochefort's codebreaking allows the Pacific Fleet to learn of a Japanese invasion force heading for Port Moresby. Two of the Fleet's four available carrier groups - the USS Lexington and Yorktown - are dispatched to the Coral Sea, where they engage two of the First Air Fleet's carriers, Division Five, the Shokaku and Zuikaku, and a smaller carrier. The Lexington is attacked by some two hundred Japanese planes and sunk, while the smaller Japanese carrier is sunk and some damage is wrought to the rest of Division Five. The Yorktown is also heavily damaged and some 100 US aircraft are lost.After the Yorktown returns to Pearl for repairs - a three-month job compressed to three days via 1,200 technicians working around the clock - Captain Garth and Joe Rochefort meet Admiral Chester Nimitz with after-action reports from Coral Sea. It is here that Rochefort broaches a theory that Objective AF in Japanese code traffic may be the Island of Midway, near Hawaii; Rochefort asks that a dummy message about a shortage of fresh water be sent from Midway in the clear. Deciding no harm can come of it, Nimitz has his aide LTC Earnest Blake have the message sent.Days later a transmission from the Japanese warbase on Kwajalein Atoll in the Marshall Islands is intercepted by Pearl and it confirms that AF is indeed Midway. Garth awakens Nimitz with the news.Meanwhile Yamamoto has laid out his plan - a Northern force is to invade several Aleutian Islands to draw US attention from Midway, where the First Air Fleet - now down to four carriers, the Akagi, Kaga, Soru, and Hiryu - will attack Midway; Admiral Kondo's invasion fleet will then occupy the island and the US will have no choice but to counterattack with their remaining carriers, under the presumed command of aggressive Admiral William F. Halsey. There is no concern for the understrength nature of the First Air Fleet given that Division Five was considered the weakest unit of the Imperial Navy's carrier force. Admiral Nagumo, though, does have some misgivings that the plan depends on the US reacting as expected.Nimitz meanwhile gets bad news - Halsey has been hospitalized and will not be available to defend Midway, so he hands command to one of his cruiser commanders, Raymond Spruance. Atop this, Nimitz has to deal with Vinton Maddox, a "scalp-hunter" from Washington who believes the Japanese are feeding radio traffic to deceive Hawaii into being outmaneuvered by a Japanese strike at Hawaii itself or even California.Captain Garth is assigned to the USS Yorktown, now operational despite Coral Sea damage, under Admiral Frank J. Fletcher, while Admiral Spruance commands the carriers Enterprise and Hornet. Also assigned to the Enterprise's air group is Matt's son, Tom, angry that his father tried to intervene on behalf of his girlfriend.In early June long range reconnaisance seaplanes spot the two Japanese armadas, and as expected Nagumo's air fleet attacks Midway, slaughtering the island's small group of fighters and strafing and bombing the area. Nagumo, though, has ordered scout planes to probe the area he expects American sea forces to be - northeast of Midway, as they indeed are. But a scout plane is late getting launched, a fateful delay when the Midway attack commences and returning aircraft arrive to the fleet almost out of fuel and some sustaining damage - just as the tardy scout plane picks up the US fleet and Nagumo's assistant Admiral Tamon Yamaguchi recommends an immediate attack on the US force even with aircraft not properly armed for anti-ship action.The Midway attack has brought out the air armadas of the three US carriers, but attack by torpedo planes is intercepted by Japanese fighters; Group Eight from the USS Hornet is massacred and only Ensign George Gay survives, while Group's Six and Three achieve no success either; Tom Garth and other fighter pilots do succeed in shooting down several enemy fighters but Tom's plane is pierced by fire and the cockpit blows up in flame, severely injuring Tom.Amid the martyrdom of the Torpedo Groups, Raymond Massey and Max Leslie of the Enterprise and Yorktown's dive bomber squadrons reach the enemy force just as Nagumo has begun to launch his planned attack on the US fleet; caught completely by surprise, the Japanese carriers are pummeled by dive bombers and their flight decks, stacked with launching aircraft and bombs carelessly stacked aside, are ripped to shreds. Within a minute or so, the Akagi, Kaga, and Soryu are shredded and left in flame, with only Tamon Yamaguchi and the Hiryu left to attack the USS Yorktown.
question: What countries were involved in the Battle of Midway?
answer: USA , Japan