xhtml
 

Exercise 1: How the Exercises Work

For each exercise, you will be given a half-finished program, and your task will be to finish it off. For this example exercise, the program you are given prints out the word Hi and your task is to turn it into a program which prints out the word Hello instead.

Try pressing Submit now.

A series of tests are performed on the program you submit to see if it does the right thing. First it is compiled with the command javac Hello.java, and this will get a green tick if it succeeds or a red cross if it doesn't. If it succeeds, the program will be run with the command java Hello. The text printed by the program will be compared with the text expected, and again you will get a green tick or a red cross.

Your task is to get all green ticks. If not, come back to this page, edit the program to fix it up, and submit it again.

Hint 1


Back