Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 9
    I was assuming the question was about the number of bytes allocated in memory for a String object. If the question is about the number of bytes required to serialize the String, as others have pointed out, it depends on the encoding used. Commented Aug 13, 2013 at 17:02
  • 3
    Source for ur answer ? Thanks Commented Feb 6, 2014 at 8:02
  • 1
    Note: sizeof should be multiple of 8. Commented Sep 30, 2016 at 14:09