To be sure, Java beginners don't need calculus and discrete knowledge at all (it would be better if they did). On the one hand, this is a higher-level design, which generally involves complex algorithms, such as game design and big data analysis. When learning a language, they generally don't encounter such problems. Secondly, some related algorithms have been encapsulated by predecessors, so just call them directly.
So in fact, you can start learning Java first, and you will naturally know what you need. The problems of Google and Baidu can basically be solved, and Java is still popular.