Java Solution passes all test cases
\n\nclass Solution {\n    public boolean isRectangleOverlap(int[] rec1, int[] rec2) {\n        int x1 = rec1[0];\n        int y1 = rec1[1];\n        int x2 = re
\n```\nclass Solution {\n    public boolean isRectangleOverlap(int[] rec1, int[] rec2) {\n        int x1 = rec1[0];\n        int y1 = rec1[1];\n        int x2 = rec1[2];\n        int y2 = rec1[3];\n        \n        int z1 = rec2[0];\n        int w1 = rec2[1];\n        int z2 = rec2[2];\n        int w2 = rec2[3];\n        \n        if (x1 >= z2 || x2 <= z1 || y1 >= w2 || y2 <= w1) return false;\n        \n        //take care of a line, not rectangular\n        if (x1 == x2 || y1 == y2 || z1 == z2 || w1 == w2) return false;\n        return true;\n        \n    }\n}\n```\n
[]