how long do you think it would take to learn Java? Watch
You will generally find while learning that a large amount of your time is spent Google'ing and digging into problems, understanding how/why things work or don't work, picking up bits of code which other people have written to try to understand how other people think about problem solving, reading through examples and tutorials/documentation to learn new concepts and learning from different sources of information, or trying different things and attempting to solve problems through trial-and-error to check how you think something 'might' work, and then understand how it 'really' works..
These should give you a good intro to Java:
Decent free e-book here: http://greenteapress.com/wp/think-java/
Also, here's some good free online courses from various top universities for learning Java and getting into a bit more depth:
(Enrol and choose the "Audit" option to unlock these for free - ignore the subscription or paid-for certificates)
A few more on EdX too from UBC and MIT. Again, ignore the paid-certificates and use 'audit':
Roughly speaking, you should be confident with a lot of these things:
- Strong core Java programming skills and a solid understanding of the language and its runtime (including its "garbage collector" and string pool)
- Able to use an IDE (integrated development environment/code editor), and use that to write/build/run/debug Java programs. e.g. JetBrains IntelliJ IDEA and its debugger is a really good tool choice, and its debugger is really useful.
- Good programming habits and able to write well-structured, human-readable code. (consistent and following common Java coding standards e.g. https://google.github.io/styleguide/javaguide.html )
- Able to use and understand the "OO" features of the Java programming language
- Understanding the underlying concepts and principles behind the "OO" programming paradigm.
- Understanding of more advanced Java concepts/features including Generics, Reflection, Lambdas, Streams, Threads and Network programming.
- Able to use many of its core libraries including 'Collections', File I/O, and comfortable with the 'java.util' libraries.
- Strong computational thinking skills, ability to think algorithmically and understand methods of solving problems computationally
- Understanding of some core computer science principles around logic, different kinds of data representation, computation, some core O/S skills.
- Write code which handles errors well, proper 'exception' handling, writes logic which handles "edge-cases" and "corner-cases" properly, code which doesn't fail on bad user input, etc.
- Able to write automated unit tests in Java. Understand and appreciate the concept of test-driven development (TDD).
- Have built at least one large, non-trivial app project using Java - possibly using 'Swing' to create a desktop UI. Alternatively using the Android SDK to make an android app. Something equivalent in size and complexity to a computer science undergraduate final-year-project.
- Know how to use "git" and have hosted a project on GitHub. (Not really about Java but an essential skill for all programmers these days, also really useful to have GitHub to showcase your project/s).
- Some understanding of Functional programming concepts and principles..
- Some awareness of software design principles such as 'GRASP' and 'SOLID' as well as some understanding of well-known OO 'design patterns'.
- Some understanding of SQL and relational databases, able to write a Java project which can use a SQL database
Obviously not all of that is 'just' about Java because writing code is only part of the job that programmers do; programming is really all about problem solving and having enough of an understanding of computers and technology to be able to get to the root cause of a problem then find a good technical solution.
You need the mindset of being able to analyse and think around a problem from all of its different angles (e.g. not just the immediately obvious cases but corner-cases too), able to spot patterns and break problems down into sub-problems. Have enough in-depth understanding of the tools to be able to build a solution as well as make sure that you understand the problem well enough to be able to fully test the code you've written too.
The bottom line is that the key to mastering any new set of skills like this is to practise first-hand. Personal projects are an ideal way to do that, so it can be really helpful to set a goal of thinking about something to build. Even if it's something relatively trivial and straightforward at first like a simple text calculator, or a UI calculator. You can think about more advanced programming challenges as you gain more experience.
Here's a few decent sites to get some ideas for programming challenges: