Java does not deal with strings as arrays of bytes, but as objects : String « Java Source And Data Type « SCJP






public class MainClass {
  public static void main(String[] argv) {
    String name = ""; // an empty string, but still an object
    String type = ".TXT";
    String longtxt = "A great long bunch of text \n" + "to illustrate how you break long lines.";

  }
}








1.15.String
1.15.1.Java does not deal with strings as arrays of bytes, but as objects
1.15.2.A String literal with the Unicode representation
1.15.3.A string literal is a source code representation of a value of a String object