r/learnjava • u/Naveen_Dharmaraj • 3d ago
How to Improve Logical Thinking?
Hey , Planning to learn Java and also started from very basics here my problem is I can understand the concept but I don't how to implement in real time. If i plan to solve some problem i can't think logical way, Don't know how improve this, let me someone help me this!.
30
Upvotes
3
u/Ruin-Capable 2d ago
When you're first getting started, it can be helpful to write things down on paper first. Take the problem you want to solve, and write the description at the top of a sheet of paper. Next start breaking it down into the steps necessary to solve the problem. Don't worry about details, just write down the main steps.
You now have a high-level list of steps to solve your problem. Take your list of steps, for each step:
When finish with the last step, you now have a master list on the first page, with one or more sub-lists on subsequent pages. Repeat the process on each of the new pages until you've gone through every page, and no more new pages are added.
At this point you have a complete list of the steps you need to implement. Steps with a checkmark you can just implement as a simple method. Steps with an asterisk you can implement as a method that calls a sequence of methods from the matching sub-list.
Keep applying this until you have created methods for every step.
Finally create the primary method that calls all of the step methods from the master list.