Whats the difference?

Whats the difference between the following two Statements

String s= "JAVA";

String s= new String("JAVA");

What is the difference between the two statements from the point of view of Compiler Interpretation?

How can a Class(String Class) can create objects without new oprator or constructor. Explaination from the point of view of compiler would be helpful?

[388 byte] By [Jitu-javaa] at [2007-11-27 11:46:04]
# 1

Request for someone to do your hemoework - denied.

Next customer please.

floundera at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 2

Okay man!!!

anyway thanks for ur concern and reply...

Jitu-javaa at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 3

Hi,

simply you refer string and string buffer (or) otherwise called as mutable and immutable,

drvijayy2k2a at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 4

> Hi,

>

> simply you refer string and string buffer (or)

> otherwise called as mutable and immutable,

Rubbish.

drvijayy2k2,

Many of your answers like this one are rubbish because they are either (a) provide factually incorrect information or (b) provide answers to questions that weren't asked as is the case here. Please make more of an effort to check your answers for accuracy and relevency before posting them. Posting rubbish answers does more harm than good.

cotton.ma at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 5

though it can be funny to see the lazy buggers trash around making things work that we know will never do when we give them :)

But you do indeed need to do such things deliberately, and not accidentally.

jwentinga at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 6

I wanted an answer not an ego clash. I'm new to java. So pls help me if u can.

Jitu-javaa at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 7

and I told you, it's not our job to do your homework.

floundera at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 8

please refer the link

http://forum.java.sun.com/thread.jspa?threadID=784187&messageID=4459779

prabha_suna at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 9

Thx Prabha for that very useful discussion. The discussion in th post was extremely nice.

Thank u so much.

Have a nice day.......

Jitu-javaa at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 10

Which goes to show that this question gets asked all the time and instead of whining about how we didn't help you, you could have made a little effort yourself and did a search. But I guess lazy sods prefer to be spoonfed.

floundera at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 11

Sorry dude it wont happen next time

Jitu-javaa at 2007-7-29 18:05:25 > top of Java-index,Java Essentials,New To Java...
# 12

> Thx Prabha for that very useful discussion. The

> discussion in th post was extremely nice.

>

> Thank u so much.

>

> Have a nice day.......

Notice, however, that the "answer" given was merely a link to the correct information, as provided by another poster from this very thread whom you chose to be mildly insulting toward

georgemca at 2007-7-29 18:05:26 > top of Java-index,Java Essentials,New To Java...