File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes string question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "string question" Watch "string question" New topic

string question

johny doe
Ranch Hand

Joined: Dec 07, 2007
Posts: 78
what is the difference between
building a String

String s="abc"
String s2=new String("abc");

what is the difference between
making s.equals(s2);
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46344
Somebody else asked a very similar question recently here. Does that answer your question?
I agree. Here's the link:
subject: string question
It's not a secret anymore!