Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror

Comment: Re:Secret message (Score 0) 126

by pstudent12 (#18035362) Attached to: Camera Phones Read Hidden Messages in Print
Here's the java version

public class x
{
public static void main (String args[])
    {
    String m =
    "01000010 01100101 00100000 01110011 01110101 01110010 01100101 00100000 01110100 01101111 00100000 01100100 01110010 01101001 01101110 01101011 00100000 01111001 01101111 01110101 01110010 00100000 01001111 01110110 01100001 01101100 01110100 01101001 01101110 01100101 00101110";

    int i = 0;
    for (int n = 0; n < m.length(); n++)
        {
        char c = m.charAt(n);
        if (c == ' ') {
            System.out.print((char)i);
            i = 0;
            }
        else
            {
            i = i << 1;
            i += ((c == '0') ? 0 : 1);
            }
        }
    }

}

//Be sure to drink your Ovaltine

Science is to computer science as hydrodynamics is to plumbing.

Working...