An aeroplane is a large, highly visible object. Unless you're going to fly it only at night from remote airfields and can guarantee radar invisibility, the world will find out about it sooner or later. (Note that the F-117 Nighthawk is rumoured to have been in service for several years before it became public knowledge, flying under exactly these restrictions)
There will also be large holes in public finance where funds have been used to pay for development, so anyone with an interest in seeing what a government has been up to can find out about such projects from public records (yes - we know that black projects can be hidden, but there is a limit to what one can get away with)
It's also easier to keep really important secrets if they're relatively small. Tell the world you have a bright shiny new aeroplane, with a whizz-bang rocket system, and the world won't look for the fancy gadget on the instrument panel that vaporises enemy jets electronically at a range of 500 miles. (Any resemblance to a real weapon is purely coincidental.)
Of course, anyone with a real interest in this new weapon system, such as a super-power enemy, has a pretty good idea what's going on anyway.
Footnote: The J20 is a Chinese aeroplane, not Japanese.