I know that String a = "hello"; will put the "hello" into string literal pool. my question is:
1.
String a = "hello";
String b = "hell"+"o";
Does the string literal pool has three object: "hello", "hell", and "o"?
2.
String a = "hello";
String b = new String("hello");
then there will be a "hello" object in string literal pool and a string object in heap?
3.
BufferedReader br = new BufferedReader(new FileReader("names"));
String line = br.readLine(); //(the value of line is "hello" now, for example)
then there will be a "hello" object in string literal pool and a string object in heap?