Your While
loop seems fishy. You probably want to start a new block there.
while (System.currentTimeMillis() - before < msFinch*1000) {
Your if
syntax is wrong. Remove the ;
after the condition:
if(fRobot.isObstacle() == true) {
System.out.println(obstacleCount);
obstacleCount++;
}
if(fRobot.isObstacle() == false) {
System.out.println("No Obstacles hit");
}