/* Program that attempts to modify a string inside * a method. Shows that Strings are immutable. * * Carsten Butz, September 2002 */ class TestString{ public static void main(String[] args){ String s = "abcd"; append(s,"efg"); System.out.println(s); } public static void append(String s, String t){ s = s+t; return; } }