字符串转二进制;二进制转字符串

String str = "ABC";
        String tem = "";
        char[] c = str.toCharArray();
        for(int i=0; i>"+tem);
        for (String s: tem.split(" ") ) {
            BigInteger big = new BigInteger(s, 2);
            int x = big.intValue();
            System.out.println("二进制===>>"+s + ", valueOf()==>>"+String.valueOf(((char)x)));
        }

 

你可能感兴趣的:(JAVA)