these equal to each other:
new File("c:\\a")
new File("c:\\a\\")
new File("c:\\a","")
new File("c:\\a\\","")
but
new File("c:\\a","\\") not equals to them
but
new File("c:\\a","\\b") equals to new File("c:\\a","b")
why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
equals()– Compares two abstract pathnames lexicographically.The following prints make it clear, that this have not the same path.
output