java default value of string code example Example: java string default value It's initialized to null if you do nothing, as are all reference types.