สตริงไม่เปลี่ยนรูป — ทุกการดำเนินการจะสร้างออบเจ็กต์ใหม่ การต่อข้อมูลซ้ำๆ ทำให้เกิดวัตถุชั่วคราวจำนวนมากและแรงกดดัน GC ที่ไม่จำเป็น StringBuilder และ StringBuffer แก้ปัญหานี้: พวกมันไม่แน่นอน ทำงานบนอาร์เรย์อักขระภายใน และไม่สร้างสตริงระดับกลาง

ปัญหาการต่อข้อมูลซ้ำซ้อน
Full content is available with a subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.