Imagine that for some reason you need a specific number, and until you get it, nothing good will happen (or something bad will happen). Have you got a picture of that in your mind? Do you have a feel for your role? Good, now let's complete an interesting task. We have some code. You need to comment out as many lines as possible to make the program display the number 19.
The required number
- 3
Locked
Comments (32)
- Popular
- New
- Old
You must be signed in to leave a comment
Lunita
21 December 2022, 15:28
This was easy for me!
0
Jeff Kenney
1 December 2021, 05:49
Just as a refresher:
Does the value of the variable change based on the last line of code defining the value of the variable?
0
Jeff Kenney
1 December 2021, 05:44
Error: My favorite number is five.
Cannot complete task š.
0
David CƔceres
9 August 2021, 09:28
Fun one,it's an interesting way to get used to interactions between lines of code.
+2
AlasCaras
6 February 2021, 06:03
Only the lines with "2" in them should be comment out.
+5
Ahu
5 October 2020, 16:58
Again, I managed it, because I used an online java compiler and randomly comment and uncomment the lines. Through randomly commenting and uncommenting I got the solution, but in all seriousness it is just waste of my time because a) I don't know what I am doing, b) there is no explanation how someone supposed to calculate or find it out on her/his own , c) I doubt this is helping me to understand class and objects.
+1
Ahu
5 October 2020, 16:52
I really hate this sort of tasks and I have doubt it is helping with learning Java.
+1
Keston Bailey
29 April 2020, 22:01
So how do you solve this problem not using trial and error??
+4
theCalculator
16 August 2019, 00:35
If the print method is calling the y variable shouldn't I automatically by deduction comment out any x variable?
0
theCalculator
16 August 2019, 00:33
Please advise in the print method or main method is the command given to add, subtract or multiply these x and y variables?
0