LoginSignup
2
2

More than 5 years have passed since last update.

java でも愛。。。

Posted at

よし、java で

import java.io.*;
import java.lang.Byte;

class Love {
    public static void main(String[] args) throws Exception {
        byte sei[] = "生".getBytes("UTF-8");
        byte shi[] = "死".getBytes("UTF-8");
        byte ai[] = new byte[sei.length];

        for (int i = 0; i < sei.length; i++) {
            ai[i] = (byte) (shi[i] & sei[i]);
        }
        System.out.println(new String(ai, "UTF-8"));
    }
}

なんか異常にめんどいなって思ったら

こんな簡単だった。\(^o^)/

ところで、ByteStream ってのは無いんですね。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2