A good place to start is Oracle Java Tutorials. Read topic by topic, try out examples given, don't just read them.
Read a lot Beginning Java forum on this website, so you'll see most common problems to solve, approaches.
Research problems a lot on your own, if you feel can't understand it, provide some well presented example with questions, so we could try to clear this together.
Theory, practice, theory, practice. Practice not necessarily means hands on actual coding. That could be diagrams drawing, pseudo code writing on a piece of paper.
Most of exercises can be solved with pencil and piece of paper. In fact, this is where you should start when solving problems.
For the static member declaration, you would start from the section "Productions from §8 (Classes)"
-> ClassMemberDeclaration (because you declared a static field)
-> and so on
(edited) The line of code where you're getting the compiler error is of the form of an AssignmentAssignmentStatement, which is under the section "Productions from §15 (Expressions)" "Productions from §14 (Blocks and Statements)"
If you trace the production of an Assignment, you will not be able to match it with any legal productions that will fit the syntax for a ClassMemberDeclaration as defined in the above hierarchy. That's why you get a compiler error, because that line does not follow Java Language syntax rules.
You may ask "How is a beginner supposed to know all this stuff?"
Well, I took my very first programming course in college. This was back in the mid 1980s, in the Philippines. As students in the College of Engineering we were required to learn computer programming and at that time, we were taught Pascal. The book we used was written by Peter Grogono and it included the Pascal language BNF as one of its appendices. Occasionally, our instructor would have us refer to the BNF in the book and walk us through the syntax of a particular language construct. I don't know if I was one of only a few who actually paid attention to our instructor whenever he did that but I found it very useful in understanding how the Pascal compiler worked and why it would give the particular error messages it did when my programs had syntax errors in them.
This early introduction to BNF and my efforts in understanding how to read it helped me tremendously when I took more advanced courses in Computer Science where we had to write our own simple compilers and parsers/lexical analyzers. And I was a Mechanical Engineering student. My point is that I don't think it's a matter of being a beginner or not. You just need enough curiosity and perseverance to wade through those definitions and figure it out. It's kind of like deciphering a puzzle. You start from the top and work your way down, trying to match your code with the patterns defined by the syntax rules. When you can't find a match, you'll know why your code is not allowed.
I admit though that I'm a bit of a nerd and I like that kind of thing so walking through BNF and seeing if my code matched a syntax rule pattern was an interesting exercise for me. ¯\_(ツ)_/¯