Japan has a single national flag: the Nisshōki (日章旗, "sun-mark flag"), commonly called Hinomaru (日の丸, "circle of the sun"). It features a crimson disc centered on a white field, symbolizing the sun and Japan's "Land of the Rising Sun" identity.
Questions about "two Japanese flags" usually stem from:
The Hinomaru was formally designated the national flag in 1999 under the Act on National Flag and Anthem, though it had been the de facto national flag since 1870.
In summary: One national flag (Hinomaru), one military/self-defense flag (Rising Sun), many regional/organizational flags. The premise of "two national flags" is incorrect.