教育路上
摘要:java对字符串的拼接和调用复制数组的方法。以下是我们为大家整理的,相信大家阅读完后肯定有了自己的选择吧。
2021-06-22 09:42刘永莘
public class ArrayCopy { //声明定义初始化数组 static byte a[] = { 65, 66, 67, 68, 69, 70, 71, 72, 73, 74 }; static byte b[] = new byte[a.length];//声明定义数组,大小等于a的长度 public static void main(String args[]) { System.out.println("a = " + new String(a)); System.arraycopy(a, 0, b, 0, a.length);//调用复制数组的方法 System.out.println("b = " + new String(b)); } }
访客的评论 2023/12/07 07:45
文中描述的是准确的吗,如何报名!