valid-number.java - import java.util.regex.Pattern class Solution public boolean isNumber(String s String regex =\\d\\d)|\\d(e\\d return

valid-number.java - import java.util.regex.Pattern class...

This preview shows page 1 out of 1 page.

import java.util.regex.Pattern; class Solution { public boolean isNumber(String s) { String regex = "[+-]?((\\d+\\.?(\\d+)?)|(\\.\\d+))(e[+-]?\\d+)?";
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '19
  • public boolean isNumber, return Pattern.matches

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes