I more or less understand my System.out.println(x); is 12, but I don't understand why System.out.println(y); is 2...it doesn't make sense at all.. what am I missing??
I don't get it...even after solving it.
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
10 September 2021, 13:29
Its simple math. If you uncommented both lines (which is not the solution) here is what the results of each lines would be:
forum post, Its a day one lecture for a programming class that has a lot of great tips and explains how to succeed and what to expect through learning to code.
As a programmer you need to be able explain what each line in a code does. Most college programming courses mandate that you comment each line of code as a way to demonstrate your understanding. While this is not a college course, I recommend that you practice doing the same. If you are able to explain what you want to do in comments, writing code becomes a lot easier. Watch the first video on this +3