It's good to be a programmer: your salary will grow rapidly. And if this doesn't happen, you can influence the situation with a little help from your hacker friends. Imagine that you have access to the automated payroll system. You need to write an interceptor method that will add $1000 to each salary payment.
Pay raise
- 3
Locked
Comments (83)
- Popular
- New
- Old
You must be signed in to leave a comment
ak
9 September 2025, 04:58
a = a + 1000;
System.out.println("Your salary is: " + a + " dollars per month.");
+2
Elhestia
2 September 2023, 19:46
Hint: + (a+1000) +
0
codewoman Frontend Developer
12 September 2022, 21:50
Oh my god, I've been here for 15 minutes, and you know where I was going wrong? instead of typing "per month" I was typing "*fer* month" and then it was just the last step haha and when I changed f = p everything went baadumpiti in my head... and sorry for my english :p but is really funny when you recognize your error in the code, and i wanted share this 😆😆
0
Anonymous #10762391
25 August 2021, 12:51
In the hackSalary method, create a new integer called x which adds 1000 to int a (salary).
Then in the same method, print the ("required text but include " + yourNewInteger + "in the argument.")
Don't forget correct punctuation :O
+1
Jose Luis
31 May 2021, 18:43
In the hackSalary method you should include one line with the output, with the text required, inserting your operation and finishing wit the other text required. Just concatenate these wit symbol '+'
0
Eros nullfeathers
18 March 2021, 07:21
It took 32 tries to realize that it didn't want println, it wanted print lol
+2
Rica
11 April 2021, 17:38
Lord...thank you. Extremely fickle.
0
Tim Gorman
7 March 2021, 17:34
Couldn't work this out when I thought that it was correct. Had to get help and I'd missed the " : " got to read these questions better, silly mistake again.
0
Leonard
16 January 2021, 12:30
Uh noo, I didn't see my mistake for a soooo long time: It was just "...per months."
+1
Java_Mooood
12 October 2020, 18:01
Add print statement to hackSalary method and inside it concatenate a +1000
0
chan kenneth
21 January 2021, 08:07
how ?
i added
System.out.println and i also don't get anything
0
mastere
25 September 2020, 04:55
I tried it 17 times even though I nearly had it right the first time. I was wondering what was wrong every time I would change something a little. Then it hit me! I forgot the Colon " : " after the " is " in the string.
Your salary is: 8000 dollars per month. I kept putting it like this "Your salary is " Instead of like this "Your salary is: " If you got it wrong just check it over again in detail to make sure you did not miss anything like I did the first few times. Even a missing colon " : " can mess you up on this one.
+1