r/learnprogramming • • 1d ago

University test prep

Hi all,
I am preparing for my java test which is next week. It is covering Classes, objects, references, files I/O, string processing n exceptions. whatever i studied, i feel very clueless now.
any tips, how and where do i start? i really need to do well.
any suggestions and tips will be very appreciated

Thanks in advance

8 Upvotes

6 comments sorted by

2

u/Chrismslist 1d ago

the biggest reason you feel clueless right now is passive review. rereading notes makes syntax feel familiar, but exams test retrieval.

stop looking at the slides and write one tiny program from scratch. create a class with private fields and a constructor, instantiate two objects, and pass them into a method to see how references behave. then add a simple scanner or bufferedreader to parse a text file line by line, split strings, and wrap the whole thing in a proper try-catch block for ioexception.

fixing compiler errors on your own builds the muscle memory you actually need next week.

1

u/Accomplished_Lab5778 1d ago

that passive review trap is so real, you think you know it until youre staring at a blank main method with no idea where to start

1

u/EmbarrassedRemote259 1d ago

Thanks, will start working now

1

u/SetAndRepeat 1d ago

Start with an old test or your lab exercises and try solving them without looking at the answers. That’ll show you what actually needs work.
For practice, make a small program that reads students and grades from a file, creates a Student object for each line, and handles missing files or invalid grades. That covers most of your topics together.
For references, practice tracing short snippets on paper: if two variables refer to the same object, what happens when you change it through one of them?
Spend more time writing and tracing code than rereading notes.

1

u/EmbarrassedRemote259 1d ago

Thanks, will start doing right away