It's a relatively simple matter. There are many ways, I'll describe one of the "cleaner" ways to get there despite being a bit more work for it.
In java, strings are little more than an object wrapper for a char array.
So the first thing you need to do (assuming CLI) is use an input technique. Look at using the Scanner class in Java, the API should have some pretty good examples of usage as well.
Once you've retrieved your string input, you then use the .toCharArray() function on it. This will give you a char as a result.
Use a for loop to iterate the char array. Subtract 3 from the char. You may need to handle the bounds of the ascii character to keep it on letters themselves (I don't know if that's a valid criteria or not, but that's simply a matter of knowing the min and max, and if you go past the min, wrap the difference by subtracting from the max instead).
With your new char, you can start assembling a new string. You can use concatenation or StringBuffer to do this.
And just like that. The hardest part will probably be the boundaries.
header('HTTP/1.1 420 Enhance Your Calm');