title: Need Guidance for mobile number validation
body: <p>The Task it to check the input number is valid if it starts with only 7/8/9 and contains 10 digits.
  Here is the code.
  Correct me. I know I'm wrong.</p>
  
  <pre class="lang-java prettyprint-override"><code>public boolean validateMobileNumber(long number) throws Exception {
  
      String num = Long.toString(number);
  
      String regex = "@\"^[7-9]{10}$";
      if (num.equals(regex))
          return true;
      else
          throw new Exception("Invalid Number");
  }
  </code></pre>