@Test public void testCheckSumEmptyString() { assertEquals(0, CheckSum.process(new BufferedReader(new StringReader("")))); }
public static int process(BufferedReader is) { int sum = 0; try { String inputLine; while ((inputLine = is.readLine()) != null) { for (char c : inputLine.toCharArray()) { sum += c; } } } catch (IOException e) { throw new RuntimeException("IOException: " + e); } return sum; }
CheckSum { public static int process(BufferedReader is) { int sum = 0; try { String inputLine; while ((inputLine = is.readLine()) != null) { for (char c : inputLine.toCharArray()) { sum += c; } } } catch (IOException e) { throw new RuntimeException("IOException: " + e); } return sum; } }
CheckSum { public static int process(BufferedReader is) { int sum = 0; try { String inputLine; while ((inputLine = is.readLine()) != null) { for (char c : inputLine.toCharArray()) { sum += c; } } } catch (IOException e) { throw new RuntimeException("IOException: " + e); } return sum; }  }
CheckSum { public static int process(BufferedReader is) { int sum = 0; try { String inputLine; while ((inputLine = is.readLine()) != null) { for (char c : inputLine.toCharArray()) { sum += c; } } } catch (IOException e) { throw new RuntimeException("IOException: " + e); } return sum; }  static void main(String[] args); static int process(BufferedReader is); }
CheckSum { public static int process(BufferedReader is) { int sum = 0; try { String inputLine; while ((inputLine = is.readLine()) != null) { for (char c : inputLine.toCharArray()) { sum += c; } } } catch (IOException e) { throw new RuntimeException("IOException: " + e); } return sum; }  static void main(String[] args); static int process(BufferedReader is);  }