how to add record separator (ASCII 30) in java string

ascii, java

Solution

Well if you know the ASCII value, then use it. `char` represents a character with ASCII value:

char record_separator = 0x1e;
String s = "hello" + record_separator + "whatever"

Problem

Example: ``` String FirstName; String LastName; String FullName = FirstName +"\RS"+ LastName; // Error ``` but \RS is not supported in java.

Original source