• 0

Trying to learn Java but failed miserably in all attempts


Question

Hello,

 

I have started to learn Java about 1 year ago (I gave up... well... I rage quit after a ~6 months and wanted to get back to it almost instantly but my brain kept saying "nope").

In theory I can write some very basic things, also in theory I know what are the fields, classes, constructors, I know the data types, I can write tests, I even know some Spring  annotations and I think I understand them(!).

 

But in practice and in reality I never truly understood anything beyond hello world (strangely if you would show me some advanced code and say "finish it by adding Spring annotations" I will probably succed in doing it). I'm not able to write anything on my own as in reality I do not understand a thing. I tried to read the books and follow them in "practice mode", I tried some video tutorials for a very begginers, yet when it comes for me to write anything beyond hello world I change into mindless zombie. More about video tutorials - when I follow them everything seems to be cool and I feel the power, but as soon as I finish it and try to excersise on my own, my head is empty. I'm getting very frustrated about all of this as I'v always been a quick learner (I have an IQ of 136) and here I can't get a simple things.

 

 

 

  Quote

for(int i=0; i<10; i++)

Expand  

This for example. I know it is a part of the loop. And I know(?) it is some condition(?) for "for" statement. But thats it. I really don't know how the loop works, even though I wrote a lot of them when I followed the tutorials. Especially the "i++" part irritates me the most as always when I see it I'm like "what the hell is that i++, what is it doing, what does it means??".

 

Well, I simply can't understand the basics (the loop case is just one of the many) and no book, no video tutorial, and no practice helped me. I would really like to learn Java, and the most importantly I would like to understand at least the basics, especially since I have invested soo much time in it.

 

Could someone advise me how to learn all those things? Or how to understand them? (I tried to google my questions many times before but didn't find an answer) I would be really and eternally grateful.

 

Thank you in advance :)

Edited by SoapDish

5 answers to this question

Recommended Posts

  • 0

Consider for a moment how you end a line of code - with a semi colon (;) so what you have is essentially three little lines of code.

 

int i = 0;

i<10;

i++

 

You also know its a loop because of the for syntax so... you are creating a little integer that is your loop counter (int i) and setting it to 0.

Then you are saying while i < 10 meaning if i is less than 10 keep looping.

Finally i++. This means increment i by 1 ( i = i+1 ).

 

Does that help?

 

  • 0

It's never the goal to understand every detail of all code, it's more important to understand the architecture.

 

Following tutorials is a great way to learn how to make a calculator when it's a tutorial about making a calculator but it's not that easy to use the same tutorial to make a sudoku solver as example.

 

So how do we learn to realize ideas into actual code?

 

Divide it, then divide it again, and again and again till the steps are so easy that it's no longer an issue to realize those steps.

 

  1. Write your idea down.
    • e.g. Sudoku solver
  2. Think about the global steps needed.
    • Values input
    • Calculate solution
    • Show solution
  3. Divide those global steps in logical smaller steps and realise them, if needed look for solutions online.
    • Create a GUI with 9 input boxes
    • Get input values from GUI on button click
    • Look at algorithms for solving sudokus
    • Pick an algorithm
    • Realize this algorithm by dividing all logical steps and looking up the required code to realise each step and combining all the code.
    • Show the calculated values in the GUI by filling the empty input boxes.
  4. Put everything together and you've made a sudoku solver :)

 

So why is dividing problems into small steps so important?

 

When you google "how to make a sudoku solver" you will not get any actual answer or just another tutorial. 

But when you google "how to store values from a sudoku?" and "how to loop through a 2 dimensional array" you get actual specific answers with code that is explained and makes sense since it's just a few lines of code instead of a whole program.

 

That's great but what about more complex programs?

 

Thereare multiple programming paradigms that fit different scenarios. A very common paradigm is OOP which stands for Object Oriented Programming, this makes it easier to work with data and logic by defining objects like a Car that has a color and a numberplate and can drive() but also brake().

 

What to do when I don't know how to program my logic in Java, C#, Python etc?

 

As I said before: Write down and divide!

Write your logic down using psuedo code as example, this is code you can make up yourself, if you don't know how to do a certain step in logic just write down a sentence describing what should be done by the computer. Then divide this psuedo code in small steps and look each step up, in most cases the solution is found quickly if not you can always post questions on this forum or sites like Stackoverflow.

 

Making diagrams also helps in the progress, illustrate your logical thinking steps and the data used in the application using logic flow diagrams and entity relationship diagrams.

 

Finding clear and educating answers for very specific questions is hard, divide it and look for the answers for smaller questions instead.

 

Programming is like a journey, it's a matter of dividing the problem is smaller and smaller steps and solving those steps like a puzzle.

 

 

TL;DR

I type too much when I'm stuck in a train.

  • Like 2
  • 0

Sounds like someone tried to teach you programming by starting with classes and unit tests rather than basic control flow statements. I saw that before and it was a Java class indeed.

 

Try to find a course that does the opposite? You could even just use a more beginner-friendly language like Python; tutorials tend to be proceed more logically. It's highly popular in teaching institutions. https://www.python.org/

 

You can start coding right away without installing anything here: https://repl.it/languages/python

  • Like 2
  • 0

Something to keep in mind is that programming computers is NOT for everyone despite the attempts by various organizations to encourage everyone to do it such as "Hour of Code"

 

You can train a brain to do almost anything, but for most people, most things feel like lifting a weight up the hill and when they find their "thing" it becomes a welcome downhill relief. Programming may simply not be your "thing"

 

That being said most online education is terrible and most university education competes for the same "terrible" award. So if you feel it is something you really want to do then find a teaching style that matches your own learning style. From your example, you seem like you might be a "hands on" type of learner and would benefit greatly from some sort of Raspberry Pi type kit that turns lights on and off by using basic Machine Language (Assembly Programming) so that you can get a feel for exactly what the CPU is doing before you move up to all of the crazy Abstractions and Metaphors that "simplify" programming.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Microsoft 365 Word gets SharePoint eSignature, now you can ditch third-party signing tools by Paul Hill Microsoft has just announced that it will be rolling out an extremely convenient feature for Microsoft 365 customers who use Word throughout this year. The Redmond giant said that you’ll now be able to use SharePoint’s native eSignature service directly in Microsoft Word. The new feature allows customers to request electronic signatures without converting the documents to a PDF or leaving the Word interface, significantly speeding up workflows. Microsoft’s integration of eSignatures also allows you to create eSignature templates which will speed up document approvals, eliminate physical signing steps, and help with compliance and security in the Microsoft 365 environment. This change has the potential to significantly improve the quality-of-life for those in work finding themselves adding lots of signatures to documents as they will no longer have to export PDFs from Word and apply the signature outside of Word. It’s also key to point out that this feature is integrated natively and is not an extension. The move is quite clever from Microsoft, if businesses were using third-party tools to sign their documents, they would no longer need to use these as it’s easier to do it in Word. Not only does it reduce reliance on other tools, it also makes Microsoft’s products more competitive against other office suites such as Google Workspace. Streamlined, secure, and compliant The new eSignature feature is tightly integrated into Word. It lets you insert signature fields seamlessly into documents and request other people’s signatures, all while remaining in Word. The eSignature feature can be accessed in Word by going to the Insert ribbon. When you send a signature request to someone from Word, the recipient will get an automatically generated PDF copy of the Word document to sign. The signed PDF will then be kept in the same SharePoint location as the original Word file. To ensure end-to-end security and compliance, the document never leaves the Microsoft 365 trust boundary. For anyone with a repetitive signing process, this integration allows you to turn Word documents into eSignature templates so they can be reused. Another feature that Microsoft has built in is audit trail and notifications. Both the senders and signers will get email notifications throughout the entire signing process. Additionally, you can view the activity history (audit trail) in the signed PDF to check who signed it and when. Finally, Microsoft said that administrators will be able to control how the feature is used in Word throughout the organization. They can decide to enable it for specific users via an Office group policy or limit it to particular SharePoint sites. The company said that SharePoint eSignature also lets admins log activities in the Purview Audit log. A key security measure included by Microsoft, which was mentioned above, was the Microsoft 365 trust boundary. By keeping documents in this boundary, Microsoft ensures that all organizations can use this feature without worry. The inclusion of automatic PDF creation is all a huge benefit to users as it will cut out the step of manual PDF creation. While creating a PDF isn’t complicated, it can be time consuming. The eSignature feature looks like a win-win-win for organizations that rely on digital signatures. Not only does it speed things along and remain secure, but it’s also packed with features like tracking, making it really useful and comprehensive. When and how your organization gets it SharePoint eSignature has started rolling out to Word on the M365 Beta and Current Channels in the United States, Canada, the United Kingdom, Europe, and Australia-Pacific. This phase of the rollout is expected to be completed by early July. People in the rest of the world will also be gaining this time-saving feature but it will not reach everyone right away, though Microsoft promises to reach everybody by the end of the year. To use the feature, it will need to be enabled by administrators. If you’re an admin who needs to enable this, just go to the M365 Admin Center and enable SharePoint eSignature, ensuring the Word checkbox is selected. Once the service is enabled, apply the “Allow the use of SharePoint eSignature for Microsoft Word” policy. The policy can be enabled via Intune, Group Policy manager, or the Cloud Policy service for Microsoft 365 Assuming the admins have given permission to use the feature, users will be able to access SharePoint eSignatures on Word Desktop using the Microsoft 365 Current Channel or Beta Channel. The main caveats include that the rollout is phased, so you might not get it right away, and it requires IT admins to enable the feature - in which case, it may never get enabled at all. Overall, this feature stands to benefit users who sign documents a lot as it can save huge amounts of time cumulatively. It’s also good for Microsoft who increase organizations’ dependence on Word.
    • It's always good to have an option to secure your stuff to another medium. I did that with DVD/CD collection, and run my own media server now. It's more convenient that way and no need for separate players anymore.
    • Google Search AI Mode gets support for data visualization and custom charts by Aditya Tiwari Google announced it is rolling out support for data visualizations and graphs for finance-related queries in Google Search's AI Mode. Introduced last month at the Google I/O 2025 keynote, the feature lets you analyze complex datasets and create custom charts simply using natural language prompts. The updated AI Mode lets you compare and analyze information over a specific period, Google explained. It generates interactive graphs and provides a comprehensive explanation for your questions. AI Mode utilizes Gemini's multimodal capabilities and multi-step reasoning approach to comprehend the question's intent while accessing historical and real-time information relevant to the question. For instance, instead of manually researching individual companies and their stock prices, you can use AI Mode to compare the stock performance of different companies for a specific year. Once the graph is generated, you can choose the desired time period using the mouse cursor and ask follow-up questions based on the data presented. These new data visualizations for finance queries are available to users who have enabled the AI Mode experiment in Labs. AI Mode was introduced earlier this year as an experimental feature in the US. The feature is an upgraded version of AI Overviews, and Google closely worked with AI power users through the initial development process. It uses the “query fan-out” technique to perform multiple related searches across subtopics and different data sources, then combines them to come up with a comprehensive response. Google updated AI Mode last month to use a custom version of the latest Gemini 2.5 model. It added several new features, including Deep Search, live capabilities, agentic capabilities of Project Mariner, a new shopping experience, and the ability to add personal context by linking Google apps. The search giant is planning to turn AI Mode into its bread and butter. It has begun testing ads for the feature, which will appear below and be integrated into AI Mode responses where relevant.
    • Guys, you should find another way to promote your deals... It's the third article in the last months that promote this deal for an upgrade from 10. Considering that upgrade from 10 to 11 is free it's a total non-sense.
    • Store should be a shrine of useful applications, vetted and verified. Easily sorted by publisher. Windows should start with not much installed and have things as options in the store. Not the wild west mess that it is. You could delete 95%+ of the crap on there and no one would notice. They need to add a better UI to the updates, it's awful right now.
  • Recent Achievements

    • Week One Done
      luxoxfurniture earned a badge
      Week One Done
    • First Post
      Uranus_enjoyer earned a badge
      First Post
    • Week One Done
      Uranus_enjoyer earned a badge
      Week One Done
    • Week One Done
      jfam earned a badge
      Week One Done
    • First Post
      survivor303 earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      431
    2. 2
      +FloatingFatMan
      239
    3. 3
      snowy owl
      212
    4. 4
      ATLien_0
      211
    5. 5
      Xenon
      157
  • Tell a friend

    Love Neowin? Tell a friend!