The answer to life, the universe, and Project Euler
Processing chunk-by-chunk vs line-by-line

Obviously, if the input file was of 1TB size,
containing a single line full of words,
your computer probably wouldn't have enough memory to run this program.
It could be rewritten to process the input chunk by chunk rather than line by line,
and it will work with input of arbitrary size.
It won't be nearly as pretty and definitely not a pleasant reading.

That being said... 


The problem description clearly states the input is a 16K text file
If somebody asked you to process a 1TB file with a single line I think you could safely tell them to go to ... Tell them to change their specs.


So, I'd say don't sweat it.
Using Java 8 streams for the effect of elegant code that even non-Java programmers find pleasant to read,
at the expense of reading the entire line 16K into memory,
is a good trade-off.

Another way to cut off the double quotes, without .substring

Instead of this:


.flatMap(line -&gt; Arrays.stream(line.split(",")))
.map(str -&gt; str.substring(1, str.length() - 1))



You could split on sequences of non-word characters,
and skip the first value (an empty string):

.flatMap(line -&gt; Arrays.stream(line.split("\\W+")))
.skip(1)


Slightly more natural arithmetic expression

In isTriangular, instead of multiplying by 0.5,
I find dividing by 2 more natural.
That way it also nicely corresponds to the formula you included there in the comment:

    return n * (n + 1) / 2 == number;


Going beyond the specs a bit

The wordValue method converts input to uppercase,
but the referenced file already contains only uppercase words.
So the step is unnecessary for Euler,
but sure it's more generally useful this way
(except for the hard-coded path to the input file).

Comment out bits not for review

For clarity for reviewers, 
I would comment out these lines,
which are clearly meant for yourself only (and for playing around):


        .peek(System.out::println)
        .mapToInt(ProjEuler42::wordValue)
        .peek(System.out::println)