q:Difference between String and StringBuilder?

ans: when we perform concatinate operation on strings using String it creates separate memory for every time.

There is no creation of new memory in StringBuilder.In this case StringBuilder is efficient.

Advertisements