1 Reply Latest reply on Apr 23, 2007 1:04 PM by 807606

    String memory allocation

      when i am writing the code
      String a="";
      String b = null;
      String c="null";
      what will be the difference in the memory allocation in the heap?
        • 1. Re: String memory allocation
          there will be 2 string objects created (assuming those strings have not already been interned). one will be the size of a string object, and the other will be the size of a string object plus 4 characters

          why are you so interested in memory allocation and strings? what's your underlying concern?