Easy Java Solution || ⭐⭐⭐⭐⭐
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public boolean canBeEqual(String s1, String s2) {\n         \n         char ch[] = new char[4];\n         \n        for(int i =0;i<4;i++) ch[i]=s2.charAt(i);\n        \n        \n        for(int i =0;i<4;i++)\n        {\n            boolean ans= true;\n            \n            if(ch[i]==s1.charAt(i)) continue;\n            \n            else if(i+2<4 && ch[i+2]==s1.charAt(i))\n            {\n                  char c = ch[i+2];\n                ch[i+2]=ch[i];\n                ch[i]=c;\n            }\n            else return false;\n                 \n        }\n        return true;\n          \n        \n    }\n}\n```
['String', 'Java']