The method returns null, which basically gives you:
String s = null ;
As in any
Java code, if you try to print a String that contains a null reference, the output is "null" (minus the "'s of course).
Now why did they make getParameter return a null value instead of throwing a NullPointerException? The specification doesn't appear to make mention of why null is returned (that I can find at least), but I assume it is to put the responsibility on the developer for handling at runtime what happens if the attribute doesn't exist.
Throwing an exception involves introducing new references and all that when it isn't really practical or necessary to do so. Why create a whole new exception object for you to handle when you can just return a null and let the developer deal with it as they will? Takes less resources from a container standpoint.
If you really want to know what's happening behind the curtain, find the container's implementation of HttpServletRequest and look at getParameter(), see how they're handling things.