I know that you can use reflection in Java to get the name of class, methods, fields...etc at run time. I was wondering can a method figure out its own name while its inside it's self? Also, I don't want to pass the name of the method as a String parameter either.
For example
public void HelloMyNameIs() {
String thisMethodNameIS = //Do something, so the variable equals the method name HelloMyNameIs.
}
If it that is possible, I was thinking it would probably involve using reflection, but maybe it doesn't.
If anybody know, it would be greatly appreciated.