+ 6

Is my assumption correct?

... that the use of the explicit keyword in the constructor with the int parameter causes the invocation of the one with the double parameter (in the second case of the example below) with an implicit type conversion happening and without a compile time error? https://www.sololearn.com/post/174063/?ref=app

12th Nov 2019, 3:03 AM
Sonic
Sonic - avatar
4 odpowiedzi
+ 3
~ swim ~ you're right. I did get it right by a bit of a guess 😂. Had to look up the exact reason and see if there was any other expert opinion.
12th Nov 2019, 5:17 AM
Sonic
Sonic - avatar
+ 1
Mabe
12th Nov 2019, 4:10 AM
Minn Ko Ko
Minn Ko Ko - avatar