In this exercise we are calling print function twice and giving it two different strings but we have declared only one string variable "s" in the print method definition. Shouldn't there be two string variables to receive two different strings?
Shouldn't there be two string variables for two different messages being printed?
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Gugun
28 April 2019, 02:23
It doesn't matter you pass in the different String variable when the method is called as long as the variable is String because the print method parameter receives one String argument. So that all you have to do is that you have to make print method to display the argument that you pass in 4 times in each method invocation.
0
naboo78
27 April 2019, 20:23
Review the instructions, they're carefully worded.
hint:
"The print method should display the string 4 times. Each time, on a new line.
0