Ranak Bansal1,207 Points
What is the purpose of %s?
Why must we use the '%s' when calling a variable in our code? I am unable to understand what the %s does, and if it is being used to call our code, why do we have to type 'firstName' as well?
Steven Parker195,101 Points
The "%s" is a format specifier that serves as a placeholder in the template string for where the value of the variable will get plugged in. This particular one reserves space for a string variable, which is what the "s" stands for.
just asking to piggyback off of the original for my understanding, so does the %s call any(all) strings in in the file thus why you have to specify firstName. like if I had another string I would just use %s but at the end call it like console.printf(), lastName;???