I know that the getName() function on the main thread will return the String main, but this can be changed with setName().
getName()
main
setName()
Is
One possibility is to call Thread.currentThread() at the start of main(), and hold on to the reference.
main()