Java vs. Ruby

Here are two example solutions for the problem

Write a threaded server that offers the time.

The first example is written in Java, the second in Ruby (taken from the excellent book “The Ruby Way”). Both versions are implemented to be very simple. Please judge for yourself:

Java (31 lines of code)

Starting it:

Ruby (8 lines of codes)

Starting it:

Taken from my comment at comp.lang.ruby.