These seem to be completely unrelated topics - probably better in separate posts.
----
1. Your interpretation is correct. || doesn't necessarily indicate a
file - it may be another directory contained within another directory.
----
2. Uniqueness for objects is a bit complicated, and depends on the equals() methods of the particular classes involved. Here you have an Integer of 3, and a Long of 3. Both Integer and Long define their equals() methods to require that the other object be the same class, in order to be equal. Since Integer and Long are not the same class, these are considered not equal - even though both are 3, numerically.
Why did they do it this way? I don't know - to me, it feels like a mistaken decision made long ago, that they keep now for backward compatibility. Many classes have similar requirements in their equals methods, but not all. It's possible for two different classes to have another parent class or interface in common, that defines equals() such that it can include different class types within it. Look at List for an example, which allows an ArrayList and a LinkedList to be equal if their contents are equal. They could have done something similar, defining equals() in the Number class to give the same result as == for primitive values. But, they didn't, so we're stuck with it.
----
[no number]
It's an array of arrays, with only one row in it. If you're having an infinite loop while printing it, that indicates you have a bug in your code, which we can't see.
----
3.
Dylan Kwon wrote:How is the reversed method being applied to a character? Isn't this method used to reverse an entire array?
The reversed method in this case is being applied to the Comparator, not any array, nor a
String - though other methods exist with similar names which could apply to those other types. But, this one is on Comparator, and is defined in that class. The way it works is that it takes another Comparator (in this case, the one created by Comparator.comparing()) and creates a new Comparator with the opposite output.
Dylan Kwon wrote:What is the blank argument of the sort method supposed to be? And how do the methods above supply that argument?
According to the API for Collections.sort(), the second argument (if there is one) should be a Comparator that knows how to compare elements of the type in question - Strings in this case. As for "how do they work?", I think that's a bit too general a question at this point, that involves many different details. The two different code samples use different techniques to create two different Comparator objects. One uses a lambda expression, and one uses other methods on the Comparator class. Have you studied either of these? I suggest reading more about each, and asking more specific questions about the parts you don't understand. But not as part of a long list of completely unrelated questions, because this does not have a short answer.