The classic hello world program on the Lego robot using leJos

In BlueJ create a new class called HelloWorld. Click New Class and name it HelloWorld.

Type in the code below

Click Compile, look for errors. Close the window

Right click the HelloWorld class, from the NXJ menu choose NXJ_run USB.

Be sure the robot is turned on!

Here are some other things you can do with the LCD display.