Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
Number of Object created on String creation?
Mohit Sunrise
Greenhorn
Posts: 2
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hola Guys
I have a query .How many objects are created when we do :
String
s = new String("
java
");
what exactly happens here ??
Thanks
Mohamed Sanaulla
Bartender
Posts: 3225
34
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Mohit, welcome to Javaranch. This is a very common question about Strings. Please
SearchFirst
in the forum, you would get lot of similar posts
Update: useful link:
https://coderanch.com/how-to/java/String
Mohamed Sanaulla |
My Blog
| Author of
Java 9 Cookbook
|
Java 11 Cookbook
Campbell Ritchie
Marshal
Posts: 79153
377
posted 12 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
The Corey McGlone link in the link Mohammed Sanaulla quoted is also very useful. But it is very rare to need to write
new String("Campbell")
or similar.
Mohit Sunrise
Greenhorn
Posts: 2
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks Mohamed !
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
String Objects
How we can find that how much string objects has been created?
Query with String statement
Is there any means to check the number of objects created when a java prgram runs.
Adding authorization to access webservice
More...