would someone please explain the difference between these definitions

class A
  class << self
    def hello
      puts 'hello'
    end
  end
end

class B
  def B.hello
    puts 'hello'
  end
end

A.hello
B.hello