package cn.itcast_02;
import java.util.Arrays;
public class ObjectOutputStreamDemo {
public static void main(String[] args) {
String s = "hello";
System.out.println(s);
System.out.println("-----------");
String[] arr = { "hello", "world", "java" };
String s1 = arr.toString();
System.out.println(s1);
System.out.println("--------------");
String s2=Arrays.toString(arr);
System.out.println(s2);
}
}
写输出结果 |
|
|