Tag: reflection


Reflection and String immutability

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...