Why can I still make changes to this final variable? [duplicate]
问题 This question already has answers here : Final variable manipulation in Java (10 answers) Closed 4 years ago . If name is declared final , why i can still call name.append and the output is: shreya ? I thought final variables cannot be changed once a value is assigned? public class Test1 { final static StringBuilder name = new StringBuilder("sh"); public static void main(String[] args) { name.append("reya"); System.out.println(name); } } 回答1: final refers to not being able to change the