static int stringSize(String string){
  int size=0;
  if (string != null) {
    size+=HEADERS + 4 * 4;
    size+=HEADERS + 2 * string.length();
  }
  return size;
}

static int stringSize ( String string ) { int size = 0 ; if ( string != null ) { size += HEADERS + 4 * 4 ; size += HEADERS + 2 * string . length ( ) ; } return size ; }
returns an estimate of the memory footprint , in bytes , of the given string .
