I read this article Kotlin And Python Are Fun, But Java Developers Are Semantically Aligned With The Future by Venkat Subramaniam.
The author is an expert in making predictions about languages and he says Java has a bright future. It is adapting to become more relevant - the Switch expression has been improved and the new GraalVM increases performance of Java and similar languages. Java is strong on concurrency and that will be great for cloud programming where non-blocking operations are important. e.g. Loading of assets in your browser while a partially loaded page is displayed.
Here are courses where you can learn Java online. You learn concepts and complete questions or tasks in the browser/app IDE.
- Codecademy - Learn Java. I got started as a Python developer through Codecademy, so I going to recommended taking a Java course there for anyone interested. .
- Solo Learn - Learn Java. Solo Learn is also great and has a mobile app which works offline. The course there is well-structured, but you will be dealing with snippets to learn syntax, rather than learning logic.