寫多幾個class和method反而要打多d碼。
2.為何以下碼錯?
public class Data{
Map<Character, Character> z = new HashMap<Character, Character>();
z.put('一', '左');
z.put('二', '右');
}
public class yyy{
public static void main (String[] args){
Data dd=new Data();
System.out.print(dd.z.get('一'));
}
}
更新1:
因為"code too large", 個main處理唔到, 因為太多z.put, 點知搬咗出來javac 都係話"code too large"