title: How to take only first 3 numbers from a long decimal number
body: <p>I want to find the IP class.The IP address example is 198.160.12.0 (this will be entered in EditText)
  I want to take only first 3 numbers, how can I do that?</p>