May not be the best way, but elegant way.
Arrays.deepToString(Arrays.asList("Test", "Test2")
import java.util.Arrays;
public class Test {
public static void main(String[] args) {
System.out.println(Arrays.deepToString(Arrays.asList("Test", "Test2").toArray()));
}
}
Output
[Test, Test2]