Verizon interview question

how to make string and integer thread safe