What is the best way to practice and learn Java code?

I think that the best way to learn and practice any language is by doing projects.

Starting from a simple one – a console(program console) game for example.

Then continuing to a GUI game.

Then adding memory to it.

Then creating a server so that two players can play.

And later trying to optimize the algorithms and performance using regex and multi threading.

This is just an example of course. You can learn the different concepts with many different and small programs.

If you want to learn java – there are plenty of good sources such as “Udacity’s Intro to java”, Sololearn, TutorialsPoint, and many different YouTube channels.

Just download and install JDK and download a good text editor like Notepad++ or Atom (I use it). Then start coding.

Don’t download any IDE like eclipse or netbeans as they make things very easy for you and you don’t get to learn some basic concepts like creating packages etc.

When you are a amateur coder and you want to shift to development then go for IDEs (I use Eclipse).

And for practicing problems I would suggest geeksforgeeks or hackerearth. They have many simple as well as hard problems for you to try your coding skills.