String s = "helloworld";
String s1 = "hello";
String s2 = "world";
String s3 = s1 + "world";
System.out.println(s3 == s);//false
System.out.println(s3.intern() == s);//true
false
true
String s = "helloworld";
String ss1 = new String(s.toCharArray());
System.out.println(ss1);
String ss2 = new String(s);
System.out.println(ss2);
helloworld
helloworld
String s = "hello";
byte[] bytes = s.getBytes();
System.out.println(Arrays.toString(bytes));
[104, 101, 108, 108, 111]