fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. byte[] primeiroArray = "stack".getBytes();
  10. byte[] segundoArray = "overflow".getBytes();
  11.  
  12. terceiroArray.write(primeiroArray);
  13. terceiroArray.write(segundoArray);
  14.  
  15. System.out.println(Arrays.toString(terceiroArray.toByteArray()));
  16. System.out.println(terceiroArray.toString());
  17. }
  18. }
Success #stdin #stdout 0.1s 320320KB
stdin
Standard input is empty
stdout
[115, 116, 97, 99, 107, 111, 118, 101, 114, 102, 108, 111, 119]
stackoverflow