title: Runtime casting from String to other datatype
body: <p>Hi I have Map of String values.</p>
  
  <p>I want to cast this value at runtime. </p>
  
  <p>e.g.</p>
  
  <pre><code>Map map = new HashMap();
  map.put("key1","101");
  map.put("key2","45.40");
  </code></pre>
  
  <p>Now runtime I know key1 is integer and key2 is double
  How can I cast this.</p>
  
  <p>I tried this: </p>
  
  <pre><code>("101").getClass().cast(Integer).
  </code></pre>
  
  <p>//////////////////////////////////////////////
  e.g. ...........</p>
  
  <p>String integerClass = "java.lang.Integer"; 
  String strNum = "5"; 
  Now How will you convert this strNum value "5" to Integer using integerClass.</p>
  
  <p>.....Without using new Integer(strNum) directly</p>
  
  <p>Thanks.</p>