In my javaFx application I am comparing mp4 names with the names of png and if they are the same it will be rendered in an imageView. Problem is the way I did it it also takes the file ending (.mp4 or .png) as name and then says it is different. Is there a way to say the comparison only should be until the last letter before the . ? I tried to use split but it did not really work
this is my current code:
if (listOfFiles[i].getName().contains(imglistOfFiles[j].getName())) {
System.out.println("Identische namen" + imglistOfFiles[j].getName());
}