Created
September 15, 2019 05:35
-
-
Save youngjinmo/a11125d0a0325efbc5212f08f09ea6f3 to your computer and use it in GitHub Desktop.
deepToString 예제
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
public class exampleCodes { | |
public static void main(String[] args){ | |
String data = "Hello world"; | |
String[] strArray_01 = data.split(""); | |
String[][] strArray_02 = {strArray_01, strArray_01}; | |
System.out.println(Arrays.toString(strArray_01)); | |
// [H, e, l, l, o, , w, o, r, l, d] | |
System.out.println(Arrays.deepToString(strArray_01)); | |
// [H, e, l, l, o, , w, o, r, l, d] | |
System.out.println(Arrays.toString(strArray_02)); | |
// [[Ljava.lang.String;@61bbe9ba, [Ljava.lang.String;@61bbe9ba] | |
System.out.println(Arrays.deepToString(strArray_02)); | |
// [[H, e, l, l, o, , W, o, r, l, d], [H, e, l, l, o, , W, o, r, l, d]] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment