r/learnjava • • Sep 23 '24

Java need help

Two weeks ago, I started studying Java at school, learning basic concepts like switch, for, do while, while, Scanner, and modulo. The problem is that when I try to solve a new exercise, I’m not able to do it because I don’t clearly understand how to solve the logic behind it. I either need ChatGPT’s help or for my teacher to break it down for me. the guy sitting in front of me does all the exercises in about 10 minutes, while it takes me 10 minutes just to finish one, and I still make logical mistakes (not syntax errors) but rather mathematical ones. How can I improve my logic or/and reasoning In Java? Btw I know that the guy In front did code before and I am aware that it is a matter of time till I fully understand and be able to solve independently exercices without any help.

1 Upvotes

15 comments sorted by

View all comments

12

u/MissionInfluence3896 Sep 23 '24

You have to go through basic exercises again and again and again and study code snippets and methods from many places to understand patterns

-3

u/Then_Use_4152 Sep 23 '24

Thanks man I just discovered recently w3schools and it been really helpful

5

u/jewbarrymore_ Sep 23 '24

the worst resource you could pick

1

u/8dot30662386292pow2 Sep 24 '24 edited Sep 25 '24

No it's not. Geeksforgeeks is.

(edit: why downvote? w3 IS one of the worst, but geeksforgeeks is definitely way more horrible)

2

u/MissionInfluence3896 Sep 23 '24

And really dont chatgpt the way out of it Even tho it will make you pass on easy exercises. As projects grow with many classes and methods reffering to each other, the chat wont have any grasp on What you do and you’ll be left alone with not more skills.

Grind the basics until it clicks. Some people are naturally better at problem solving, but dont get discouraged by comparing yourself to the top dogs. Focus on your learning and focus on your work.

2

u/hrm Sep 24 '24

W3schools is quite unreliable, some content is good. Lots is bad. Baeldung is a much better source for java content.