Advertisement
Guest User

Untitled

a guest
May 20th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public static String CorrectExpre (String exp) {
  2. String Str = new String(exp);
  3. String mis = "++";
  4. String mis1 = "**";
  5. String mis2 = "//";
  6. boolean check = Str.matches("mis");
  7. boolean check1 = Str.matches("mis1");
  8. boolean check2 = Str.matches("mis2");
  9. if (check==false || check1==false || check2==false) {
  10. return "Некорректное выражение ";
  11. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement