I want to replace null value by string Z in two dimensional array.
I have data like this:
String[][] userData = { { "User A", "A" }, { null, null }, { "User B", "B" } };
Now I need to change this userData like below:
String[][] userData = { { "User A", "A" }, { "Z", "Z" }, { "User B", "B" } };
How do I achieve this by java 8 stream and get back the result in same format (2D string array) ?