Skip to content

Task 7:

Saad Tariq requested to merge taskk-7 into main

Write a java program to understand the difference between String literal and String Object. Also use the "equals()" method and the "==" operator to compare these Strings. Solution: I write a program that takes String literal as well the string objects too and compares them using == and .equals I found that == compares the memory location while .equals compares the actual value.

Merge request reports