what will be the output when the code segment is executed (new)

后端 未结 0 1429
生来不讨喜
生来不讨喜 2020-12-12 02:44
String s1 = "MADAM";
String s2 = "";
int k = 1;

while (k <= s1.length())
{
s2 = s2 + s1.substring(0, k);
s2 = s2 + " ";
k = k + 1;
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题