Question: Given the following method definition. What will happen if you call the method with concatenate ( Hello , 5 ) ;

Given the following method definition. What will happen if you call the method with concatenate("Hello","5");
public String concatenate(String a, String b)
A) It will concatenate "Hello" and 5.
B) It will concatenate "Hello" and "5".
C) It will cause an error.
D) It will implicitly convert 5 to a string and concatenate.
 Given the following method definition. What will happen if you call

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!