Question: Write the correct String function, which shall give the same output: String msg= My color is ; String color= pink; No. Statement Output 1 My
Write the correct String function, which shall give the same output:
String msg= "My color is ";
String color= "pink";
| No. | Statement | Output |
| 1 | My color is pink | |
| 2 | PINK | |
| 3 | ink | |
| 4 | My color is |

Question 2: (2 x 4 = 8 marks) Write the correct String function, which shall give the same output: String msg= "My color is "; String color= "pink"; No. Statement Output 1 My color is pink 2 PINK 3 ink 4 My culor is
Step by Step Solution
There are 3 Steps involved in it
To achieve the desired outputs using string functions in Java you can use the following code snippe... View full answer
Get step-by-step solutions from verified subject matter experts
