Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String CorrectExpre (String exp) {
- String Str = new String(exp);
- String mis = "++";
- String mis1 = "**";
- String mis2 = "//";
- boolean check = Str.matches("mis");
- boolean check1 = Str.matches("mis1");
- boolean check2 = Str.matches("mis2");
- if (check==false || check1==false || check2==false) {
- return "Некорректное выражение ";
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement