How do we actually discard last file from java string and just get the file path directory?
Random Path input by user:
C:/my folder/tree/apple.exe Desired output:
C:/my folder/tree/ closest solution i found is from here . The answer from this forum only display last string acquired not the rest of it. I want to display the rest of the string.