Have a look at its
source code.
The answer is that no it doesn't modify or delete a file's contents.
It just tries to delete the file by asking the OS to do so.
No different from a person deleting a file in a file manager application.
Can its contents be in memory? Yes, if you read the contents into a buffer but that buffer has not yet been garbage collected by JVM, it can be in JVM's memory.
Even when it's garbage collected, it's possible its contents are still in RAM or swap file. Any program that scans memory or swap file - looking for things like english words or sequence of ASCII characters, for example - can find them.
If you meant can deleted file's contents be recovered from disk, yes that too is possible. None of the popular filesystems - ext4/FAT/NTFS - scrub the space after a file is deleted.
What exactly is your requirement?