Question: q9. what is the difference between equals() and == in java?
Answer: equals() method for content comparison. In simple words, == checks if both objects point to the same memory location whereas . equals() evaluates to the comparison of values in the objects.