I am new to programming, so let's see if I can explain this well enough.
I am making a Java package. In one of the classes there is a method that creates a file. The name of that file I have it set up as "file.txt", but I want to change it.
Let's say there is a user working on a new project and he imports the library
I solved it, but thank you all for the suggestions.
I ended up using
String name = Thread.currentThread().getStackTrace().getClassName(); File file = new File(name + ".txt");
I hope this helps someone else.