Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Techguy Sr eng.   on Oct 18 In Java Category.

  
Question Answered By: Geb Chalthoum    on Oct 18

String is an Object as is everything in Java. You
could write "new String(...)", but if you don't this
is essentially what the compiler does.

// These statements are essentially the same, since
the compiler handles this for you
String str = new String( "This is a string" );
String str = "This is a strint";

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Is String really object ? Or get search suggestion and latest updates.


Tagged: