This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "string" Watch "string" New topic
Author

string

shirsa ray chaudhuri
Greenhorn

Joined: Apr 08, 2008
Posts: 10
'String a= new String ("cat")' is it right??
Balasubramani Dharmalingam
Ranch Hand

Joined: Dec 06, 2004
Posts: 116
Can you give us some more details. What is your question ?


Balasubramani SD,<br />SCJP 1.4,SCWCD 1.4,SCJP 5.0<br /><a href="http://sd.balasubramani.googlepages.com" target="_blank" rel="nofollow">www.sd.balasubramani.googlepages.com</a>
Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165
yes,

it works.


Thanks,
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2713
    
    5

Hi,
Yes it is right, also there is another way for strings

But is that your exact need. Please explain.


Hope this helps


SCJP, SCWCD.
|Asking Good Questions|
Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165
what is exact diff between:

String a ="name";


String b = new String("name1");
shirsa ray chaudhuri
Greenhorn

Joined: Apr 08, 2008
Posts: 10
thanks for the reply
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36599
    
  16
Originally posted by neel mehra:
what is exact diff between:

String a ="name";


String b = new String("name1");
That is a question which comes up quite often, and you haven't had an answer to. It was discussed last week. Have a look at this, and if you still don't understand, ask again.
CR
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: string
 
Similar Threads
Tech Word Game
How to convert byte array into string array?
date format with MS Access database
WA #1.....word association
ResultSet to Array