• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

is there a tool to monitor the java String pool

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question number 91 in ******, I am not persuaded with the answer, I think it should be answer D ( 4 strings ) , UNLESS substring does not create a new copy

I need to ask whether trim also returns a new string or not ( it is explicitly mentioned in the book that toUpperCase, toLowerCase, replace, concat return a new modified copy of the string � a new string is created in the pool but this is not explicitly mentioned for trim and substring?


<Possible real exam question deleted>

[ November 22, 2006: Message edited by: Barry Gaunt ]
[ February 01, 2007: Message edited by: Barry Gaunt ]
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you tried if trim() returns a new String ? Why should some operations on a String return new/modified String and some modify the content of the original String ?

A hint: Strings are immutable. You can not change them. So ALL modifications will result in a copy.


try this:

pascal
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sort of mind-numbingly fascinating question belongs in SCJP.
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
******? - where did you get this question? Is this ****** a braindump site? We do not allow braindump questions on this site because the use of them for passing certifications is considered to be cheating.

If no explanation - this topic will be deleted in near future.

[ November 22, 2006: Message edited by: Barry Gaunt ]
[ February 01, 2007: Message edited by: Barry Gaunt ]
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this interesting article:

http://certcities.com/editorial/news/story.asp?EditorialsID=336&page=2

Braindump sites are now a Federal Crime.

Stick to K&B (or whatever your book of choice is) and mocks.
 
Chris Hendy
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as a tool is concerned, I have seen Jprofiler mentioned/recommended in a number of places. It's commercial but you can download an evaluation version.

http://www.ej-technologies.com/products/jprofiler/overview.html
[ November 22, 2006: Message edited by: Chris Hendy ]
 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!