String in Java is Immutable. When we use String literal (double quotes) to create a String, it first looks for String with same value in the String pool.
String first = "abc";
My question is what's the searching algorithm does the JVM searches for "abc"? It just loop the whole String Pool values?