title: Java Rest Client - Need to add local Variable in URL
body: <p>Rest client.</p>
  
  <p>Can I add a local variable for value into URL string for a Rest client ?</p>
  
  <p>Example
  URL testurl = new URL("<a href="http://X.X.X.X:7001/lab2.local.rest1/api/v1/status/database?rxnum=1111" rel="nofollow">http://X.X.X.X:7001/lab2.local.rest1/api/v1/status/database?rxnum=1111</a>");</p>
  
  <p>The above works if I provide literal value for rxnum (i.e. 1111).</p>
  
  <p>But I need rest client to utilize value of a local variable.  exam</p>
  
  <p>int rxvalue = 1111;</p>
  
  <p>URL testurl = new URL("<a href="http://X.X.X.X:7001/lab2.local.rest1/api/v1/status/database?rxnum=+(rxvalue)+" rel="nofollow">http://X.X.X.X:7001/lab2.local.rest1/api/v1/status/database?rxnum=+(rxvalue)+</a>");</p>
  
  <p>this doesn't work, obvious my  URL string is incorrect.  What is correct syntax to allow URL string to use value of local variable rxvalue?</p>
  
  <p>thanks in advance</p>