fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. char [][] one ={ {'a','b','c','d','e','f','g','h','3'},{'i','j','k','l','m','n','o','p','7'},{'q','r','s','t','u','v','w','x','2'}};
  13.  
  14. int count=0;
  15. char [] firstThree=new char[3];
  16. char [] nextThree=new char[3];
  17. for (int i=0; i< one.length;i++){
  18. for (int j=0; j< one[i].length;j++){
  19.  
  20. for(int m=0; m<3;m++){
  21. firstThree[m]=one[i][m];
  22. nextThree[m]=one[i][m+5];
  23. }
  24.  
  25. }
  26.  
  27. System.out.print(firstThree);
  28. System.out.print(" ");
  29. System.out.print(nextThree);
  30. System.out.println("");
  31. }
  32. }
  33. }
Success #stdin #stdout 0.1s 320320KB
stdin
Standard input is empty
stdout
abc fgh
ijk nop
qrs vwx