File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Interesting string methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Interesting string methods " Watch "Interesting string methods " New topic

Interesting string methods

Sarma Lolla
Ranch Hand

Joined: Oct 21, 2002
Posts: 203
Except the last two every thing else prints true.
public static void main(String [] args) {
System.out.println(" String ".toString()=="String");
Jasper Vader
Ranch Hand

Joined: Jan 10, 2003
Posts: 284
i guess cos the last two are the only two in which an actual change takes place? (t goes to T, the white space gets removed)...

giddee up
I agree. Here's the link:
subject: Interesting string methods
It's not a secret anymore!