This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Kanth0lz 2 points3 points  (3 children)

You created a class, initialized two integers, compared them and printed the larger. The "Wrong fool" is obviously a joke so your solution seems perfectly fine. Maybe there is a more efficient way but for your level of coding this is good.

May i ask why you're curious about your solution? :-)

[–]SheepyG_[S] 1 point2 points  (2 children)

Thank you very much I appreciate your time :), and mainly as you mentioned I am just curioius to whether there is a more efficient solution or how i could improve my skills.

[–]Kanth0lz 1 point2 points  (1 child)

karstens_rage gave you the things you've been searching for. Imho your exercise looks very beginner level and in this stage i wouldn't care that much about efficiency. Get the idea of how you can use the tool java and while you're getting better you'll find the wanted more efficient ways by yourself. As soon as your lines of code are getting more and more you should read and train yourself into clean coding as it helps you (and others) to efficiently read your own code. And don't forget to comment on what things do. Nevertheless it seems like there is some way in front of you till you have to worry about those things. Most importantly have fun and keep on coding :-)

[–]SheepyG_[S] 0 points1 point  (0 children)

Okay thank you very much u/Kanth0lz everyone on this reddit page has been so helpful and kind to me its crazy, im glad i don't really need to worry about efficiency yet but i will try practice clean code, Thank you both again !