>  class Foo
>    def self.bar
>    end
>
>    def bar
>    end
>  end

Arguably, the equivalent in Java is this:

 public class Foo {
   public static void bar1() {
   }

   public void bar2() {
   }
 }

Notice that you can't use the same method name statically and
as instance method in Java, whereas you can use the same name
for the class method and the instance method in Ruby.

gegroet,
Erik V. - http://www.erikveen.dds.nl/