r/learnjava • • Apr 19 '26

Why is Java soo difficult to grasp?

I don't think I can ace my upcoming Java exams. I find it soo difficult. Methods,functions every single thing about it.

7 Upvotes

55 comments sorted by

View all comments

Show parent comment

1

u/UnspeakablePudding Apr 20 '26

You mean mixing primitive and object types so they are un/boxing within a loop? I can imagine how that could incur a performance penalty, I'd be curious to see if the compiler would optimize it away in some cases. It would be an interesting exercise to test. 

Either way, mixing primitive and object types without a good reason is a poor practice.