youYou are setting groundground to false in the wrong place. You should set groundground to false at the beginning of the method. Here is the modified code:
public void checkIntersect(ArrayList obs) {
ground = false;
for (Obstacle a : obs) {
if (a.getLeft().intersects(this.getRight())) {
if (getDx() > 0) {
sidecollision = true;
setDx(0);
this.x -= 1.5f;
}
}
if (a.getRight().intersects(this.getLeft())) {
sidecollision = true;
setDx(0);
this.x += 1.5f;
}
if ((a.getTop()).intersects(this.getBottom())) {
ground = true;
setDy(0);
this.y -= .10f;
} else if (!(a.getTop()).intersects(this.getBottom())) {
// return ground;
}
if (a.getBottom().intersects(this.getTop())) {
setDy(0);
this.y += .1f;
}
}
}
}