Sign In
Ask Question
Paul
Computers & Technology
13 January, 01:34
Why is String final in Java?
+1
Answers (
1
)
Cherish Morris
13 January, 02:02
0
string objects are cached in string pool.
Explanation:
Strings in Java are immutable or final because the string objects are cached in String Pool. As we know multiple clients share the string literals so there exists a risk of one client's action affecting all other clients.
For ex:-The value of string is "Roast" and client changed it to "ROAST" so all other clients will see ROAST instead of Roast.
Comment
Complaint
Link
Know the Answer?
Answer
Not Sure About the Answer?
Find an answer to your question 👍
“Why is String final in Java? ...”
in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers
You Might be Interested in
Your teacher would like you and your classmates to conduct a science experiment and post your results. You can also comment on your classmates' results and answer each other's questions about the experiment.
Answers (1)
Explain why cloud computing can be more complex than a traditional approach.
Answers (1)
Jane sold many notebooks at her school fair and earned a good amount of cash. To keep a record, she entered all the cash values in a spreadsheet, but she forgot to enter the dollar symbol beside each amount.
Answers (1)
database may include
Answers (2)
A bag of apple chips says it contains five servings, and each serving is 100 calories. If you can consume 200 snack calories and maintain daily calorie balance, how many servings can you consume and remain within your limits? Two Three Four Five
Answers (2)
New Questions in Computers & Technology
Data for which there is temporarily no room in RAM is diverted to where on your computer? A. The paging file on the hard drive B. The system file on the hard drive C. The memory file on the hard drive D. The CPU cache
Answers (2)
The Presonus Studio Live 24 console has analog D-sub direct outputs. What cable would you need to connect this to a HD Analog interface?
Answers (2)
As network administrator, what is the subnet mask that allows 510 hosts given the ip address 172.30.0.0,
Answers (1)
What factors represents one of the sources of value derived from network effects?
Answers (1)
The advanced boot options screen can be displayed by pressing what key during the boot sequence?
Answers (1)
Home
»
Computers & Technology
» Why is String final in Java?
Sign In
Sign Up
Forgot Password?