1) What are three ways of creating a String object ?
2) What is the difference between string concat method and simply adding 2 strings ?
Richa_2
0
Newbie Poster
Recommended Answers
Jump to Postdon't just copy paste your homework here. what do you think they are? we'll help you improve your knowledge by correcting you, or by giving additional explanation if you don't understand it, doesn't mean we'll just do your homework for you
Jump to PostPlease explain exactly what is confusing you. I assume you have Googled these questions and read some of the standard answers.
Jump to PostOK!
"abc"
new String(something);
string1 + string2The only difference I know between concat and + is their behaviour when either of the String refs is null.
(ps please don't use abbreviations like N for "and" - many of our readers have English as a second or third language)
All 11 Replies
stultuske
1,116
Posting Maven
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Richa_2
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Daemon_CC
0
Junior Poster in Training
stultuske
1,116
Posting Maven
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Daemon_CC
0
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
jwenting
1,889
duckman
Team Colleague
Richa_2
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.