I'm not sure if it is a good plan to switch languages shortly. It's one thing to learn a language, but it's entirely different thing mastering a programming language.
Java is a good starting point, and I guess Java online courses will teach you desktop application programming or some easier web application programming. Switching from such a "careless" environment (careless about memory consumption and careless about CPU cycle wasting) onto an embedded world while also starting a new language could lead to some massive headaches. Errors are harder to understand. Is the code wrong? Is memory short? Is the CPU too slow and let your Raspberry project looks hanging?
I suggest you are trying to find a way to run Java on a Raspberry before you enter the world of Python. Or start learning Python, finish your IoT projects and then switch to Java. Just my 2 cents.