fork(1) download
  1. import java.util.*;
  2.  
  3. class Main {
  4.  
  5. public static void main(String args[]) {
  6. Scanner sc = new Scanner(System.in);
  7. List<String[]> l = new ArrayList<String[]>();
  8.  
  9. for (int i = 0; i < 2; i++) {
  10. // Not a good example here, since it is best to always check
  11. // whether there is next line or not before reading it
  12. l.add(new String[]{sc.nextLine(), sc.nextLine()});
  13. }
  14.  
  15. for (String[] a: l) {
  16. System.out.println(Arrays.toString(a));
  17. }
  18. }
  19. }
Runtime error #stdin #stdout 0.1s 380672KB
stdin
Standard input is empty
stdout
Standard output is empty