Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > Java

Reply
 
LinkBack Thread Tools Display Modes
Old 10-22-2004, 07:03 AM   #1 (permalink)
philthee
Registered User
 
Join Date: Oct 2004
Posts: 15
philthee is on a distinguished road
Do Multidimensional arrays work like a hash in Perl?

Perhaps can they? would be better

Say i have a file

One 232
Two 323
Three 555
One 231

can they work so as to have my code read in each line as a key and value pair, and then i can catch any instances of a key appearing twice (in this case 'One') and do something with it?
philthee is offline   Reply With Quote
Old 10-22-2004, 01:06 PM   #2 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
it can be done, but you'd need more than an array. have a look at the Map interface.

in reply to your question:
no, java arrays are only indexed with numbers. they do not work as hashes.
joe_bruin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 01:00 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting