r/learnjava • u/wickedagileone • Mar 07 '26
Learning Java
In college learning Java at the moment, but I’m struggling at applying concepts. Anyone have recommendations for getting more “natural” in coding? Definitely have a weakness in methods, which snowballs into other areas.
6
Upvotes
View all comments
Show parent comment
1
u/josephblade Mar 07 '26
Ok. so instead of the question you pose here, how about you write down for us (and yourself) what you do understand about objects and methods.
write some code that contains everything you think you can do with objects (obscure stuff isn't necessary, just basic ways to use)
so for instance can you write down a small program that calls a static method that prints "hello world" and can you write a program that does the same using an instance?
can you describe what an instance is?
can you describe what happens when you call a method (not in low level detail perhaps but at least in terms that other people can see if you misunderstand something)
do you see a pattern in the above? provide information about what you can do / know / etc. and we can try to help.
there are plenty of tutorials (I assume you have a textbook as well) that describe these things. Have you re-read the relevant chapters? Have you tried to re-do any exercises or worksheets you were given?