String and StringBuffer both represent String objects. Can we compare String and StringBuffer in Java?

By ayush goel in 22 Sep 2023 | 12:41 pm
ayush goel

ayush goel

Student
Posts: 346
Member since: 21 Sep 2023

String and StringBuffer both represent String objects. Can we compare String and StringBuffer in Java?

22 Sep 2023 | 12:41 pm
0 Likes
divas goyal

divas goyal

Student
Posts: 453
Member since: 22 Sep 2023

String and StringBuffer are different. String is immutable (unchangeable), while StringBuffer is mutable (modifiable). They have different methods and use cases.

23 Sep 2023 | 04:03 pm
0 Likes

Report

Please describe about the report short and clearly.