Why is extending both ERC721 and ERC721URIStorage legal?

I have been working on a one of my issues when find out ERC721URIStorage extends ERC721. The issue is my ERC721 contract implementation extends both ERC721URIStorage and ERC721. Something similar on Java would give me compile error, but in case of solidity it compiles and even already has been deployed on Goerli Testnet.

Is it the issue? Could you please share more information about inheritance in solidity where it differs from other languages, e.g. Java?

Hello @Gelassen

That is not an issue. Just make sure to test everything on Goerli before going to mainnet.