String is mutable or immutable?

Answer Posted / sumitpalsingh

String class is immutable .In String class we can not change or modify object value. To make an object value modifiable. we can use StringBuffer and StringBuilder classes.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by abstract classes?

837


How do you clear an arraylist in java?

721


What is the purpose of lambda expressions?

806


What kind of variables can a class consist?

810


Are arrays passed by reference in java?

698


What is callablestatement? How you can call stored procedure to pass in parameter?

771


Difference between string, string builder, and string buffer?

758


Why do we need strings in java?

719


Explain wait() method of object class ?

895


What is jrmp?

745


What does this () mean in java?

761


Why does java have different data types for integers and floating-point values?

774


Which variables are stored in stack?

678


State differences between C and Java?

892


What is the difference between menuitem and checkboxmenu item?

1091