As other posts on here say, leave the
IDE (intellij) alone to begin with and start with the basics of your favourite text editor and the command line. The trail examples here on the ranch are done using the command line if you want to look at them.
The reason this advice is given is an IDE, while a powerful tool, will highlight errors and offer suggestions to fix them without you even realising what you've got wrong on the first place. Starting with the text editor will help enforce the basics of syntax, and how to read the error messages from the compiler and understand exactly what it is telling you.
As for books, head first and learning Java are both good, as is the Detil and Detil book (although it's not cheap)