Finding Bugs in Eclipse

If there is a syntax error in your code, Eclipse will tell you right away. The red underline means that something you have written will not compile. The first step to solving this problem is to save, as Eclipse will recheck your code only after each save of the program.

If saving doesn't make the red underline go away, it means you have an eror in your code. For example, the following code snippet is chock full of errors. Paste it into Eclipse, debug and run it.

public static void main(String[] args) {
	i = 0;
	while i < 3 
		print i;
	print "Finished"
		
}

This code, when run, should output:

0
1
2
Finished

HINT: There is a logic error in this code.

Remember the differences between Java and Python. If you're stuck, hover over the red underline in order to get hints from Eclipse.