Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!b10g2000vbc.googlegroups.com!not-for-mail From: mike Newsgroups: comp.lang.java.programmer Subject: Substitute value in HashMap at runtime Date: Thu, 13 Oct 2011 05:18:57 -0700 (PDT) Organization: http://groups.google.com Lines: 16 Message-ID: <70a582b4-956b-4145-9cb8-ba8fbaf751f5@b10g2000vbc.googlegroups.com> NNTP-Posting-Host: 194.237.142.20 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1318508337 29293 127.0.0.1 (13 Oct 2011 12:18:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 13 Oct 2011 12:18:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b10g2000vbc.googlegroups.com; posting-host=194.237.142.20; posting-account=1c_fOgoAAADuOXlL0A4-T9PUmVHtMSYd User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.0; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8758 Hi, If I create a HashMap with something like: static Map map = new HashMap("variable",MyPreferences.getVariableValue()); If I do it like this I guess that MyPreferences.getVariableValue() will not be substituted but be the "plain" string. How can I make my MyPreferences.getVariableValue() be evaluated at runtime? Any example? br, //mike