Template: Interval Overlapping
For overlapping questions: \n\nInterval A = [leftA, rightA]\nInterval B = [leftB, rightB]\nOverlapping region:  [max(leftA, leftB) , min(rightA, rightB)]       
For overlapping questions: \n```\nInterval A = [leftA, rightA]\nInterval B = [leftB, rightB]\nOverlapping region:  [max(leftA, leftB) , min(rightA, rightB)]                 \n```\nwhich means ```if(max(leftA, leftB) <  min(rightA, rightB))```, there is an overlap.\nSo the code of this problem is to check whether ```x is overlapped && y is overlapped```.\n```java\nclass Solution {\n    public boolean isRectangleOverlap(int[] rec1, int[] rec2) {\n        // Interval overlapping: Max(left1, left2) < Min(right1, right2)\n        // x has overlapping && y has overlapping\n        \n        int x1 = rec1[0], y1 = rec1[1], x2 = rec1[2], y2 = rec1[3];\n        int x3 = rec2[0], y3 = rec2[1], x4 = rec2[2], y4 = rec2[3];\n        boolean overlapX = false;\n        boolean overlapY = false;\n        if(Math.max(x1, x3) < Math.min(x2, x4))\n            overlapX = true;\n        if(Math.max(y1, y3) < Math.min(y2, y4))\n            overlapY = true;\n        return overlapX && overlapY;\n    }\n}\n```
[]