title: Converting String to Number in Java
body: <p>How can i convert a string to a abstract number, provided string is any valid number in java (say int, long, double etc).</p>
  
  <p>I will not know the type of number in the string, so i can't use specific primitive parsing (like Integer.parseInt, Long.parseLong etc). Is there any generic way to convert it?</p>
  
  <p>Eg:</p>
  
  <ul>
  <li>String -> Number</li>
  <li>"23423" -> 23423</li>
  <li>"34.3" -> 34.3</li>
  <li>"45364573747546" -> 45364573747546</li>
  </ul>