Class MyThreadScopedata {// Single Private MyThreadScopedata () {} // ให้วิธีการอินสแตนซ์สาธารณะแบบคงที่แบบคงที่ mythreadscopedata getThreadInstance () {// ชุดข้อมูลภายในได้ = null) {อินสแตนซ์ = ใหม่ mythreadscopedata (); map.set (อินสแตนซ์);} return อินสแตนซ์; ชื่อ; อายุ;}}