I have method which accept file and want to compare with string
for the above mention reason i did

System.out.println(targetFolder.getAbsoluteFile().equals(listPropertyValue[1]/*which is a string */)+"\n"+targetFolder.getAbsoluteFile()+"\n"+listPropertyValue[1]);

the value of listPropertyValue[1] and targetFolder.getAbsoluteFile() same value but it gives false.
Please tell me where i am wrong

I got error i used getAbsoluteFile() instead of getAbsolutePath()

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.