You've seen int, double, boolean, and char. These are primitive types. They store simple values directly in memory. String is different. It's a reference type, meaning the variable holds a reference (like an address) that points to the actual text data stored elsewhere in memory.
Why does this matter? Primitives compare with == and it works as you'd expect. But comparing two Strings with == checks if they point to the same memory location, not if the text matches. To compare String content, you need .equals():
String a = new String("hi");
String b = new String("hi");
a == b // false (different objects)
a.equals(b) // true (same text)
This trips up almost every Java beginner. Burn it into memory now.