1. 程式人生 > >安卓自測試題——第十八期

安卓自測試題——第十八期

  1. public class Example{ 
  2.   String str=new String("good"); 
  3.   char[]ch={'a','b','c'}; 
  4.   public static void main(String args[]){ 
  5.     Example ex=new Example(); 
  6.     ex.change(ex.str,ex.ch); 
  7.     System.out.print(ex.str+" and "); 
  8.     Sytem.out.print(ex.ch); 
  9.   } 
  10.   public void change(String str,char ch[]){ 
  11.     str="test ok"; 
  12.     ch[0]='g'; 
  13.   } 
  14. }