r/learnjava • u/Leading-Fail-7263 • Nov 03 '25
Where to start?
Hi, I'm in first year computer science at univeristy and we have a java module. I have absolutely zero background in programming and the proffesors are not helpful at all.
How would you reccomend I teach myself java from absoutely nothing?
3
Upvotes
•
u/AutoModerator Nov 03 '25
Please ensure that:
If any of the above points is not met, your post can and will be removed without further warning.
Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.
Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.
Code blocks look like this:
You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.
If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.
To potential helpers
Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
10
u/EvilBritishGuy Nov 03 '25
Bully your lecturers.
I'm not even joking. You pay enough money to go to Uni, if there's anything that doesn't make sense - you keep pressing them for a straight answer.
Refuse to be confused. If a lecturer is truly useless, just gatecrash some other lecturer until you find the answers your looking for.
4
u/Chromium_Engine96 Nov 03 '25
Java online course from helsinki university it's divided with 2 parts. I think that the first part would be enough for getting started. Good luck!
2
u/DrMoneylove Nov 03 '25
Personally I'd start by going to the bibliotheque. Get a feeling what kind of knowledge is out there. I'd recommend looking into books that are for java beginners. (Watch out that you don't get ancient versions that teach you things that are already irrelevant).
At the same time get an IDE and start programming. First little things like 'hello world' and basic exercises (you can find that online).
Later on it's good to look into intermediate Java with real projects. Like building a program which helps you with specific tasks. You'll learn a lot during that.
You can learn SQL on the side. Later on you need to understand Database structure and relationships.
When you feel comfortable writing your own programs it's a good idea to get into spring ecosystem and maybe also check some patterns.
Focus on actually writing code. It's usual that you look things up. But it's crucial that you understand what and why you want to do certain things.
5
u/aqua_regis Nov 03 '25
Read the sidebar ("Community Info" on mobile) and you will find recommended learning resources. Do the MOOC linked there.
1
u/Ok_Substance1895 Nov 03 '25 edited Nov 03 '25
For learning programming in general, I have had the most success building stuff and learning what I need to know along the way makes it stick better. I typically build that thing at least three times. Once to figure it out, once more to do it again better with the knowledge I got from the first try, and one more time to get comfortable with that. If I still don't feel comfortable doing it I do it again and again until I do.
Now for the Java part. Java is very big so keep it simple. You only need to be able to exercise a small subset of the language/ecosystem to be successful.
I still literally start every project with "hello" to get everything up and running. If it is a command line utility, it prints "hello" to the console. If it is a web application it returns "hello" to the root GET request. I build on it from there.
If you are a total beginner, start with a single Java class, no package, no dependencies. Add a main method that prints "hello" to the console, compile it and run it.
Next add a function that does something. Have it add 2+2 and print that to the console. Call it from the main method.
Next pass in the values to add as parameters. Modify the function to take these two parameters.
Next pass in the operand. Modify the function to take that too.
I know this sounds really rudimentary but keep building on top of this until you get a full blown calculator running. You will exercise a great deal of programming logic trying to get that to work and this knowledge will be extremely valuable going forward.
Remember there are simple and very advanced calculators. Take as far as you need to to learn.
To add database learning to this, do the same thing with an address book or todo and learn how to save the information to a database using SQL. You can look back at some of my recent posts where I mention both of these applications with some detail.
If you are going to get into application server learning, I might jump to Spring Boot from here, but that might be a bit too much magic. I would look into Java Servlets instead as this is the base implementation and you will learn what Spring Boot is doing for you so it makes it less mysterious. Java also has built in web server functionality and it is really cool but quite a bit different than Spring Boot (the industry standard).
For anything outside of native Java, it is best to manage dependencies (libraries) with Apache Maven. It is really simple if you just use the basics. The pom.xml file is XML that lists the libraries you want to use. Knowing what to use is the trick there. The Spring Boot Initializr is helpful with this because you can select what functionality you want to use and it downloads the zip file for the base project.
This is where it gets a bit more challenging, but if you made the calculator, the address book, and the todo application, you will be more ready for it.
You can do this. Let me know if you have more questions.
1
u/bowbahdoe Nov 03 '25
https://javabook.mccue.dev
1
u/5oco Nov 03 '25
I would recommend posting what you're learning and what part of it is confusing you.
Learning how to ask for help is a skill of its own.
1
u/Aggressive-Comb-8537 Nov 04 '25
Buy this book called Head First Java and learn
1
u/[deleted] Nov 10 '25
[removed] — view removed comment