fork(1) download
  1. import java.io.*;
  2. import java.util.*;
  3. public class Main {
  4. public static void main(String args[]) {
  5.  
  6. String input = "";
  7.  
  8. try {
  9. for (int i = 0; i < 6; i++) {
  10. input = bReader.readLine();
  11. String word[] = input.split(" ");
  12. if (word.length > 1) {
  13. int A = Integer.parseInt(word[0]);
  14. int B = Integer.parseInt(word[1]);
  15. System.out.println(A + B);
  16. }
  17. }
  18. bReader.close();
  19. } catch (IOException e){
  20. e.printStackTrace();
  21. }
  22. }
  23. }
Runtime error #stdin #stdout #stderr 0.09s 32940KB
stdin
1
1 1
stdout
2
stderr
Exception in thread "main" java.lang.NullPointerException
	at Main.main(Main.java:12)