Mihaela Hetea

+ Follow
since Jan 24, 2016
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mihaela Hetea

In the section "Additions to Java 8", in the last example for the merge function:

the third line should be

in order to get the listed output.
In table 7.3, Future methods, the method cancel() should have a boolean parameter.
From the java doc:
In question 20 of the review questions answer G is considered to be correct, but the Paths method is Paths.get and not Paths.getPath, so answer G should also be invalid.
On Windows, the method Paths.get(URI) doesn't throw a RuntimeException if the URI is not absolute.

The output is:

Also the examples with the http schema throw exception .
From the implementation of getPath(URI) it seems that the file:// schema is taken by default, whereas for the others the method is called, which on my computer returns file and jar. Does this mean that in the context of Path class only URI with schema file can be used or other providers can be installed? (like http for example)

In Chapter 9 NIO.2, "Changing a File Location with move()", the second Path object of

should have the name of the file addresses2.txt, according to the explanation:
"The second example moves the addresses.txt file from the directory user to the directory zoo-new, and it renames it to addresses2.txt.
This is the error I have too. Tried also with javac from command line but doesn't work either.
Tried also with java x86 1.8.0_45 and with java 1.8.0_71, same error.
The last example from chapter 4, "Collecting Using Grouping, Partitioning, and Mapping" does not compile:

The problem seems to be with the minBy collector. I'm using IntelliJ with java version 1.8.0_45
In chapter 4, "Peeking behind the scenes" in the second paragraph it says that "The source is an infinite stream of odd numbers", but the source is just an infinite stream of numbers.

In chapter 4, Using Terminal Operations for the min() and max() operations, the method signatures are missing the Comparator interface.

should be