I don't think this null is necessary for this problem.
is groupMapReduce() a new thing ?
@davorpa If you read the docs, it shows that has the null check built into it.
if (locale == null) { throw new NullPointerException(); }
do you know the concept of null-safe methods? null is not same as empty
It's no need to check for empty string, because .toUpperCase contains this condition: https://www.javatpoint.com/java-string-touppercase
Brilliant idea!
The readability can be improved looping through elements on the array, not with the use of the index. Suggesting using foreach loop.
These round brackets around the condition are not really necessary. However, the simplest solution to me.
They are only needed whenever you aren't just using a simple variable. An example is "hello, ${person.name}" or "hello, ${name.replace("a", "b")}".
When is it neccessaryly tu use them? My attempt worked without them. Thanks for reply
This comment is hidden because it contains spoiler information about the solution
Curly brackets in a string template are redundant for that particular case.
Love this implementation!
It is better to use LinkedList when you add nodes frequently to the list's end, because this operation runs O(1).
Loading collection data...
I don't think this null is necessary for this problem.
is groupMapReduce() a new thing ?
@davorpa If you read the docs, it shows that has the null check built into it.
if (locale == null) {
throw new NullPointerException();
}
do you know the concept of null-safe methods? null is not same as empty
It's no need to check for empty string, because .toUpperCase contains this condition: https://www.javatpoint.com/java-string-touppercase
Brilliant idea!
The readability can be improved looping through elements on the array, not with the use of the index. Suggesting using foreach loop.
These round brackets around the condition are not really necessary. However, the simplest solution to me.
They are only needed whenever you aren't just using a simple variable. An example is "hello, ${person.name}" or "hello, ${name.replace("a", "b")}".
When is it neccessaryly tu use them? My attempt worked without them.
Thanks for reply
This comment is hidden because it contains spoiler information about the solution
Curly brackets in a string template are redundant for that particular case.
Love this implementation!
This comment is hidden because it contains spoiler information about the solution
It is better to use LinkedList when you add nodes frequently to the list's end, because this operation runs O(1).
Loading more items...