Is "abc" a primitive value

The String literal "abc" is not a primitive value. It is a String object.

Showing Answers 1 - 1 of 1 Answers

nik7i

  • Aug 28th, 2011
 

Yes it is an object, by default string literals has treated as string object...
to prove it:

string s = "hello";
S.o.p(s.length);

string s= new string("hello");
S.o.p(s.length);

both have similar output that shows both are objects..

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions