r/learnprogramming 1d ago

Learning JAVA

How do you guys learn Java?

There are just WAY too many syntaxes to remember.

Every time I think I’ve got it, Java hits me with another one.

10 Upvotes

18 comments sorted by

17

u/_heartbreakdancer_ 1d ago

Remember concepts, not syntax. Don't try to memorize specific words.

2

u/jmclondon97 1d ago

Except the ~20 key words you’ll use repeatedly

9

u/serge-mv 1d ago

You don't remember everything, ever. Once you start using the language to solve problems and using the same things over and over again, you will remember all of that over time. The things you don't use often, you just look up when you need to.

3

u/JGhostThing 1d ago

Java is a fairly easy language, with the OOP features being one of the most complicated features.

Are you perhaps referring to the standard library?

3

u/DirkSwizzler 1d ago

About 50 chrome tabs any time I want to do anything.

2

u/lurgi 1d ago

By “syntaxes” I’m guessing you mean “function calls” and you only really learn the ones you use a lot. The rest you look up as you need them.

1

u/raven2cz 1d ago

For Java, I always bought a good book and learned from that. In paper form.

When a syntax update came, I bought a new one, and that is how it went over the years. I never had a problem with it. It is clear, everything is explained with many examples, you are not staring at a screen, and you have to rewrite it by hand in your own way so that you remember it.

Top ideal.

1

u/Capital_Ad8820 1d ago

just practice bro and remember the concepts of how you resolve the problem in your practice sessions

1

u/Realistic-Worker-499 1d ago

keep your own notes, not copy pasted tutorials, just little notes, in a notebook or digital folder or whatever

1

u/Arch_Null 1d ago

You learn by understanding your tools. Start out with your data types. Move on to loops. Then conditionals. Then data structures. Finally understand the basics of OOP

1

u/gargamel1497 1d ago

Read the source code. Use JD-GUI if the thing happens to be proprietary.

1

u/peterlinddk 1d ago

There really isn't though.

You need to "remember" classes, fields and their access modifiers, methods, return and parameter types, semicolons, for, if, while and switch blocks, and then of course generics <> for collections and so.

It isn't that different from other languages, and you don't need to remember it, you just use the language, and it sticks.

1

u/ComputerWhiz_ 1d ago

Becoming fluent with syntax comes with practice. As a beginner it's more important to learn the concepts. The syntax will just come with time.

1

u/ChocoChurros123 2h ago

you just keep going, and one day your brain will adapt and even new syntaxes won't phase you because you're naturally able to spot patterns and understand quickly

you're just in the steep part of the learning curve so keep at it

1

u/GutierreezBrxtz_85 1d ago

My advice is not to try memorizing Java syntax the way you would vocabulary; you will naturally internalize the patterns as you use them.  Pick a small project and work on it, looking up the necessary information as you go; over time, concepts like for, if, class, method, and so on will become second nature, almost like muscle memory.  The goal isn't to memorize every syntactic detail, but rather to understand what you want to achieve and know where to find the information when you forget how to implement it in Java.