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