added whetherIntersect.java