Java常用的工具函数及编码技巧


System.arraycopy(Object src,  int  srcPos,Object dest, int destPos, int length)



Java常用的工具函数及编码技巧_第1张图片


java占位符

 String stringFormat  = "lexical error at position %s, encountered %s, expected %s ";  
  
String messageFormat ="lexical error at position {0}, encountered {1}, expected {2}";  
  
System.out.println(String.format(stringFormat, 123, 100, 456));  
  
System.out.println(MessageFormat.format(messageFormat, new Date(), 100, 456));  

你可能感兴趣的:(Java常用的工具函数及编码技巧)