The Student Room Group

How do you practice programming java for beginners?

I’m a first year at uni and I’ve learnt the basics of java. How do I practise my programming skill and make sure that it abides by the code conventions etc… my issue is that if I practice programming by myself I won’t be able to understand what things I would need to improve or if I’m doing something wrong. The only opportunity that I get to practice programming and get feed back is when I get assignments for it. Any advise on how to practice java?
Use the software you have available to you and just create something small using code you know i.e. set yourself a task or project. Once you have it working or not working you could always show it to/send it to your tutor asking if they could review it and provide any feedback on it. Your tutor should be available to answer anything you give them regardless of if it is to do with assignments or not.

You could always try and see if there is a possibility to book a one to one session with your tutor to go through work you have done for example a 1 hour session a month say

You could also try to set meetings up with someone else in your lessons on the course to work through things outside of lessons. They could review code you have done giving you feedback or what they did differently/think could be done differently and you could also do the same. You could again try setting yourselves a little side project.
Yeah good question. There is a lot to learn and sometimes people try to do too much at the same time. You need to tell us more about what your assignments require. If you have basic knowledge of the syntax then the next thing you should learn is data structures and algorithms. There is so much info about DSA online its not difficult to find. You can practice online coding questions and compare your answer with the solutions(leetcode).

Next you need to learn about object-oriented programming(OOP) and design patterns. I am assuming you already know a bit of OOP since you are using Java. There are some good resources for this here: Language Books/Tutorials for popular languages - Stack Overflow. You can use these books as guidelines to practice programming.

After this, you should learn about concurrency and multi-threading. This is the hardest topic but it is quite important for building desktop applications. I think this may be beyond the scope of first year. I don't know of any good Java books you would need to google this yourself. The book I use is "C++ Concurrency in action". This is considered as the gold standard for learning multi-threading with examples in C++. However, the concepts are directly transferrable to any programming language.
(edited 2 months ago)
Reply 3
Original post by scorpion95
Use the software you have available to you and just create something small using code you know i.e. set yourself a task or project. Once you have it working or not working you could always show it to/send it to your tutor asking if they could review it and provide any feedback on it. Your tutor should be available to answer anything you give them regardless of if it is to do with assignments or not.

You could always try and see if there is a possibility to book a one to one session with your tutor to go through work you have done for example a 1 hour session a month say

You could also try to set meetings up with someone else in your lessons on the course to work through things outside of lessons. They could review code you have done giving you feedback or what they did differently/think could be done differently and you could also do the same. You could again try setting yourselves a little side project.

Lol my tutor is very toxic and makes me feel even worse when i ask them questions. I was thinking to make a program and ask chatgpt to suggest some improvements but issue is that its not good with code conventions, or use HackerRank / LeetCode. Other than that, im not sure what to do no more.
Reply 4
Original post by jonathan_Smith
Yeah good question. There is a lot to learn and sometimes people try to do too much at the same time. You need to tell us more about what your assignments require. If you have basic knowledge of the syntax then the next thing you should learn is data structures and algorithms. There is so much info about DSA online its not difficult to find. You can practice online coding questions and compare your answer with the solutions(leetcode).

Next you need to learn about object-oriented programming(OOP) and design patterns. I am assuming you already know a bit of OOP since you are using Java. There are some good resources for this here: Language Books/Tutorials for popular languages - Stack Overflow. You can use these books as guidelines to practice programming.

After this, you should learn about concurrency and multi-threading. This is the hardest topic but it is quite important for building desktop applications. I think this may be beyond the scope of first year. I don't know of any good Java books you would need to google this yourself. The book I use is "C++ Concurrency in action". This is considered as the gold standard for learning multi-threading with examples in C++. However, the concepts are directly transferrable to any programming language.

Is using for example (LeetCode) sufficient for me to practice or would I need to make a small project and then using chatgpt to review it ( or like stackoverflow) to review my code a good way to learn? I'm just very stuck and I don't want to rely on my tutors/ peers to review my code and want to do this on a daily basis.
Original post by Anonymous #1
Is using for example (LeetCode) sufficient for me to practice or would I need to make a small project and then using chatgpt to review it ( or like stackoverflow) to review my code a good way to learn? I'm just very stuck and I don't want to rely on my tutors/ peers to review my code and want to do this on a daily basis.

Sufficient for what? Is your goal to find a Java software engineer job or you want to get high marks in a university assignment? Those are two separate goals. If latter is the case, what does your assignment require?

If you are doing Leetcode, it requires a significant amount of time to "master", if you are at a stage where you can solve most medium difficulty problems then I would say yes now is the time to work on some projects. Knowledge of DSA is very important, it worth investing time.

With regards to ChatGPT, I find it underwhelming and many times the code it produces contain some type of bugs. However, ChatGPT plus is different beast, it is night and day better and can radically speed up the learning process. I would recommend getting it(around $20/month). I am using ChatGPT plus everyday for my university coursework and its unbelievably good. It is almost like a programming partner and can be your "tutor". End your netflix subscription(or any other useless subscription) and get the plus version. Also I shared the link to stackoverflow which contains recommended Java books.

Quick Reply

Latest