XOR Strings 2

  • + 1 comment

    I tried to submit the following method: public static void main(String args[] ) throws Exception { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); String s = bufferedReader.readLine(), t = bufferedReader.readLine(); System.out.println(IntStream.range(0, s.length()).mapToObj(i -> String.valueOf(s.charAt(i) ^ t.charAt(i))).collect(Collectors.joining()));

    } although it visually presents the same result. It is difficult to understand what the real problem is.