CSC/ECE 517 Summer 2008/wiki1 6 jm: Difference between revisions

From Expertiza_Wiki
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 ==


=== Creating Hashes ===
=== Creating Arrays in Ruby ===


{|border="1" cellspacing="0" cellpadding="0" align="left"
Creating an array in Ruby is as simple as
!Ruby
 
!Java
  a = []
|-
| test
| test
|-
|}

Revision as of 02:09, 5 June 2008

Introduction

Both Ruby and Java support arrays and hash tables

Hashes in Ruby

Creating Arrays in Ruby

Creating an array in Ruby is as simple as

  a = []