CSC/ECE 517 Summer 2008/wiki1 6 arraysandhashes

From Expertiza_Wiki
Jump to navigation Jump to search

Arrays and Hashes

Arrays and hashes are built into Ruby. Arrays, of course, are built into Java too, but hashes are only available through library classes. Compare Ruby and Java arrays, as well as hashes. Write equivalent code sequences in the two languages that illustrate the convenience of programming these constructs in both languages.

Arrays

Comparison of Common Operations in Ruby and Java

Adding Elements

Sorting Elements

Hashes

Back to the assignment page