\"Social Networking App\" Please respond to the following: In a Java program, so
ID: 641342 • Letter: #
Question
"Social Networking App" Please respond to the following:
In a Java program, some programmers might argue that when it comes to storing names, addresses, phone numbers, and so on, string objects work as good as StringBuilder objects. Take your position on this argument, and provide at least two (2) examples to support your position.
Assume you had a task to convert a string object to a number. Speculate on whether or not you can convert any string object to a number with or without limitation. Justify your response.
Explanation / Answer
1) yes string work as good as string bulders....becuase in string builders we can modify values where in string they are immutable and cannot be modified
String StringBuilder
-----------------------------------------------------------
Storage Area | Constant String Pool Heap
Modifiable | No (immutable) Yes( mutable )
Thread Safe | Yes no
Performance | Fast fast
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.