Send data to arduino from PC in java over Serial (RXTXlib)

    if (r == 49){

How do you know what to send to get a 49?

    if (r == '1'){

How do You know what to send to get a '1'?

Which is easier to know?