title: Get first N digits of a number
body: <p>I'm writing a small program that displays the factorial of a number.
  When I enter the number 20 I got the number 2432902008176640000 as result.</p>
  
  <p>How can I limit a decimal number in Java.</p>
  
  <p>For example the number 2432902008176640000 should be 2432 (limit 4).</p>
  
  <p>Thanks in advance.</p>