Cubic Interview Question

why string is immutable, how to creat own immutable class.