Updated: Feb 17, 2018
I see these questions often on testing forums like Quora:
"How much Java do I need to learn for mastering Selenium?"
"How much programming do I need to learn for test automation?"
My response is "as much Java as you can".
The programming language is the most important skill for test automation so everyone should learn it very well.
But going from manual tester (with no programming skills) to test automation engineer is not an easy task because there are many learning levels in between.
1. Learn the Java basics
Understanding the Java basics will help you to create simple Selenium automation scripts.
You need to cover
fundamental data types (String, Integer, Boolean)
conditional statements (if/else, switch)
looping statements (for, while)
read and write files
use Java API
The automation scripts that you can create with the Java basics will include WebDriver objects and methods which is ok for now.
But as soon as you start having more and more scripts, the scripts maintenance becomes a problem.
2. Improve the Maintenability of Automation Scripts
Your scripts are long, they include WebDriver objects and methods and have duplicated and complicated code.
They are very difficult to change and maintain.