Monday, July 20, 2009

BlueJ : A HelloWorld Formality


BlueJ is a simple but useful Java IDE. Firstly, I use it for giving occasional lectures on Java programming. But later, I use it also for developing simple programs. BlueJ has a lightweight graphical interface (similar to) UML class diagram, so that we could easily see relationships between classes in our programs. The picture above shows the main window of BlueJ (with graphical class interface) and the code edit window (you'll get it if you double click a class on main window).
class Hello
{
public void go()
{
System.out.println("Hello, world");
}

public static void main(String[] args)
{
Hello hi = new Hello();
hi.go();
}
}

It's experiment time; just use the HelloWorld snippet above using BlueJ. It's actually a sample which comes together with BlueJ package (could look for it in the examples inside the BlueJ install directory).

No comments:

Post a Comment