CSC/ECE 517 Summer 2008/wiki1 6 jm: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
= Introduction = | == Introduction == | ||
Both Ruby and Java support arrays and hash tables | Both Ruby and Java support arrays and hash tables | ||
== Hashes in Ruby == | == Hashes in Ruby == | ||
== Arrays in Ruby == | |||
=== Creating Arrays in Ruby === | === Creating Arrays in Ruby === | ||
Line 9: | Line 11: | ||
a = [] | a = [] | ||
=== Initializing an Array in Ruby === | |||
a = ["one",45,"hello"] | |||
== Hashes in Java == | |||
== Arrays in Java == |
Revision as of 02:13, 5 June 2008
Introduction
Both Ruby and Java support arrays and hash tables
Hashes in Ruby
Arrays in Ruby
Creating Arrays in Ruby
Creating an array in Ruby is as simple as
a = []
Initializing an Array in Ruby
a = ["one",45,"hello"]