I think @ankitsinghaniyaz 's answer was spot on, but I wanted to add something as well.
As you progress in learning programming, you'll quickly realize that it is one of those topics that the more you learn...the more you realize you don't know and still need to learn. This is especially relevant in your case, with languages such as Java and Javascript (not implying that the languages are related in anyway, they aren't), as these languages have such an incredibly large ecosystem surrounding them that it can be difficult to find out where to begin and how-to evaluate yourself. It really is a rabbit hole that you choose to explore when you take up an interest in programming.
Rather than become frustrated in what you feel you don't know, I'd suggest a couple things you help guide you:
Find an example roadmap, curriculum, or outline of learning objectives for Java. This should be especially easy, and there should be many to choose from, since Java is such a popular language - in both the workforce and in academia as a common first language for CS students. Check out a university's first year computer science curriculum and expectations. This will often give you the main fundamentals and topics that a Java developer should be comfortable with (within the context of a computer science student.
If you're interested in Java for more practical reasons, rather than from a computer science and academic perspective, than I would suggest starting with an open source project or tool that you find interesting or useful and diving right on in. Check out Github for a place to start searching for a project. There is nothing wrong with attempting to contribute to a project as a beginner, and even if you aren't contributing reading the issues and patches are a great way of understanding how solutions are built to solve problems and then how they are implemented. If you come across something that is completely unfamiliar, that's perfectly fine! That just gives you an opportunity to note what was unfamiliar to you, and search for an answer, experiment through trial and error.
In a few hours, once I have some time, I will edit the post with some resources.