Java – Basics
If you have no programming experience yet, then the following free materials are recommended to pass:

‣ Iakiv Kramarenko's book: Intro to Software Development (with examples in HTML, CSS, JavaScript) OR Harvard's CS50 on edx.org
‣ any of java courses on edx OR Udemy (1, 2, 3) OR something simpler like learnjavaonline.org/

If you have experience in programming, but not with Java, then you can quickly get familiar with the language through:

‣ Fast intro to the language syntax: Learn X in Y minutes Where X=java
‣ Simple interactive tasks on the language syntax in the format of tests: Java Koans

In the remaining time, you can practice more and harden your skills using one of the following resources:

exercism.io: Java Track
CodinGame
codewars

Also, it will be more convenient for you if you will save versions of your code for solving certain problems - using version control systems. I recommend using git and one of its most popular servers – github.com. Here's a free tutorial on the topic: Github - Hello World.