Questions tagged «concatenation»



16
නව අරාවක් නිර්මාණය නොකර, දැනට පවතින ජාවාස්ක්‍රිප්ට් අරාව වෙනත් අරාවක් සමඟ දිගු කරන්නේ කෙසේද
දැනට පවතින ජාවාස්ක්‍රිප්ට් අරාව වෙනත් අරාවකින් විස්තාරණය කිරීමට ක්‍රමයක් ඇති බවක් නොපෙනේ, එනම් පයිතන්ගේ extendක්‍රමය අනුකරණය කිරීම . මට පහත දෑ සාක්ෂාත් කර ගැනීමට අවශ්‍යයි: >>> a = [1, 2] [1, 2] >>> b = [3, 4, 5] [3, 4, 5] >>> SOMETHING HERE >>> a [1, 2, 3, 4, …

18
StringBuilder vs Java හි toString () හි String concatenation
toString()පහත දැක්වෙන ක්‍රියාත්මක කිරීම් 2 ට අනුව, වඩාත් සුදුසු වන්නේ: public String toString(){ return "{a:"+ a + ", b:" + b + ", c: " + c +"}"; } හෝ public String toString(){ StringBuilder sb = new StringBuilder(100); return sb.append("{a:").append(a) .append(", b:").append(b) .append(", c:").append(c) .append("}") .toString(); } ? වැදගත්ම දෙය …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.