there is my question that normally in java we create object with new operator but when we want to use String and String is also a class then we declare object without new operator why plz answer my question
moaz.amin.37 -12 Junior Poster
Recommended Answers
Jump to Postyou didn't ask a question.
String is immutable, but it's soo often used, that having complete new instances in the memory would be a huge drain on the resources of your system.in your memory there is also a String pool, used to group all instances of a String currently …
All 3 Replies
stultuske 1,116 Posting Maven Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
203428 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.