There are several Actor class methods that can be used to determine if another class of object is 'intersecting', 'inRange' or 'neighbouring'. Use one of them possibly in conjuction with a method to reposition the object to keep it off/away from the objects in question.
Well... for example, if you use 'setLocation(getX()+dx, getY()+dy)' and 'getOneIntersectingObjects(Wall.class) != null' returns true, then 'setLocation(getX()-dx, getY()-dy)'. If you use 'move(n)', then 'move(-n)' if the return is true.
For a simple, beginners way of doing hit detection, try this.
Actor Wall;
Wall = getOneIntersectingObject(Wall.class);
if(Wall != null)
{
//Wall is being hit. Do things here.
moveRight = 0; //stop character from moving right or whatever.
}
else
{
//Wall is not being hit
}
Change "Wall.class" to whatever your wall class is named. The rest of "Wall", such as the first after "Actor", can be named what ever you want.