Reflection and String immutability
Published by Kaustubh Saha on December 26th, 2018
One very powerful but risky tool is Reflection. Using reflection, you can break almost everything - from encapsulation to immutability
Here is a piece of code which breaks immutability of String class
import java.lang.reflect.Field;
public class Muta...