Java’s String class encapsulates an array of bytes. A byte can be converted to a char, in which case, String becomes an array of characters used to compose words, sentences, or any other data you want ...
Q1: What is the difference between == and .equals() in Java? Answer: == checks if two references point to the same object in memory. .equals() checks if two objects have the same content or value.