jeudi 28 avril 2016

Need to get the variable name from the called method

Code:

class Test {

public static void main(String args[]) 
{

int valueInt = 10;

function(valueInt);

}

void function(int param) {

// Here I need to get the output as "valueInt" & not 10.

}

Kindly help me to get the variable name "valueInt" to be printed inside the method 'function'





Aucun commentaire:

Enregistrer un commentaire