Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34214

Need to get the variable name from the called method

Newsgroups comp.lang.java.programmer
Date 2016-04-28 08:16 -0700
Message-ID <8735ea75-7793-49ad-a31d-ebf6c2691bac@googlegroups.com> (permalink)
Subject Need to get the variable name from the called method
From saransamurai7@gmail.com

Show all headers | View raw


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'

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Need to get the variable name from the called method saransamurai7@gmail.com - 2016-04-28 08:16 -0700
  Re: Need to get the variable name from the called method Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-04-28 13:31 -0400
  Re: Need to get the variable name from the called method Marcel Mueller <news.5.maazl@spamgourmet.org> - 2016-04-29 08:41 +0200
    Re: Need to get the variable name from the called method Lew <lewbloch@gmail.com> - 2016-04-29 11:18 -0700
      Re: Need to get the variable name from the called method Marcel Mueller <news.5.maazl@spamgourmet.org> - 2016-04-29 20:52 +0200

csiph-web