100% beat in java very easy code for beginners 😊.
Code
![94da60ee-7268-414c-b977-2403d3530840_1725903127.9303432.png](https://assets.leetcode.com/users/images/e13b2d25-1a97-4584-87df-979af55fed1d_1736253640.4995627.png)


# Code
```java []
class Solution {
    public int maximumNumberOfStringPairs(String[] words) {
        int ans = 0;

        for (int i = 0; i < words.length - 1; i++) {
            for (int j = i + 1; j < words.length; j++) {
                // Check if words are identical or if they are pairs that are reversals of each other
                if ( words[i] == words[j] || (words[i].charAt(0) ==  words[j].charAt(1) && words[i].charAt(1) ==  words[j].charAt(0) ) ) {
                    ans++;
                }
            }
        }

        return ans;
    }
}
```
['Java']