Knowledge of certain languages provides a good basis for learning Solidity, e.g. having worked with C and possibly even with assembly languages comes in handy when reasoning about bits and bytes, storage layout, fixed-width signed/unsigned integer types, etc. in Solidity. Having worked with an OOP language like Java will make it easier to understand concepts like contract inheritance, overriding of contract methods, etc. But this doesn’t mean that you should first study either of these languages before getting into Solidity — If you want to get into Solidity, then go for Solidity directly.