Compared to Java, Ruby is a much less verbose, much more flexible language. Its arrays and hashes provide much of the same functionality split into multiple different classes in Java (implementations stacks, queues, lists, maps etc.) with a more comprehensive API. The provided each, map and inject methods allow the code to be written in much more compact and readable way compared to the traditional way of wrapping the code inside loops (though the functionality is overall the same) through passing in Ruby code blocks. Strings in Ruby are also mutable and provide a very comprehensive API.