Check If Digits Are Equal in String After Operations I in Java
Code

# Code
```java []
class Solution {
    public String Modulo(String s){
        String st="";
        for(int i=1;i<s.length();i++){
            char ch1 = s.charAt(i-1);
            char ch2 = s.charAt(i);
            int p = (ch1-'0'+ch2-'0')%10;
            st+=p;
        }
        return st;
    }

    public boolean hasSameDigits(String s) {
        while(s.length()!=2){
            s=Modulo(s);
        }
        return s.charAt(0)==s.charAt(1);
    }
}
```
['Java']