在Java中写一个解.给出两个字符串a和b,返回a和b之间的最长的不常见次序的长度.如果最长的不常见次序不存在,返回 -1.两个字符串之间的不常见次序是一个字符串,但不是另一个字符串.一个字符串s的次序是从s中删除任意数字符后可以获得的字符串. - 例如",abc"是"aebdc"的次序,因为你可以删除"aebdc"中突出的字符来获得"abc".其他"aebdc"的次序包括"aebdcemp", "aeb", 和 "" (ty).
Here is a possible solution in Java:

```
public int findLUSlength(String a, String b) {
    if (a.equals(b)) {
        return -1;
    } else {
        return Math.max(a.length(), b.length());
    }
}
```

Explanation:

- First, we check if the two strings are equal using the `equals` method. If they are equal, then there is no uncommon subsequence and we return -1.
- If the strings are not equal, then the longest uncommon subsequence will be the longer of the two strings. We use the `Math.max` method to determine the maximum length between `a` and `b`.
- The method returns the length of the longest uncommon subsequence as an integer.