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 26: Line 26:
|-valign="top"
|-valign="top"
|width="10%"|'''Row heading'''
|width="10%"|'''Row heading'''
|width="70%"|A longer piece of text. Lorem ipsum...
|width="70%"|<code>A longer piece of text. Lorem ipsum...</code>
|width="20%"|A shorter piece of text.
|width="20%"|A shorter piece of text.
{|
{|

Revision as of 02:59, 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"]


Hashes in Java

Arrays in Java

Row heading A longer piece of text. Lorem ipsum... A shorter piece of text.