I presume you know what an absolute path and a relative path mean. Have you read the documentation for Path#relativize(Path)? It isn't crystal clear, but it means how you would get from the end of this path to the target of the path passed as an argument. If you start from the location of the kodiacbear.txt file, and lion is in the same directory, ./lion will find the lion file.
posted 4 months ago
I would understand if the answer was ./lion (like you wrote) or /lion (like i thought)
But i am asking - why it's ../lion (double dots)
I will open the floodgates of his own worst nightmare! All in a tiny ad: