public class Example{ static String str=new String("good"); static char[] ch = {'a','b','c'}; public static void main(String args[]){ change(str,ch); System.out.print(str+" and "); System.out.print(ch); } public static void change(String str,char ch[]){ str="test ok"; ch[0]='g'; } }