Parallels with PHP | Sololearn: Learn to code for FREE!
+ 1

Parallels with PHP

would I be right in saying that Hashmaps are similar to Arrays in PHP, in respect to being able to use strings as 'keys'?

30th Mar 2017, 11:08 AM
William Athersych
William Athersych - avatar
1 Answer
+ 10
A HashMap makes no guarantees to the order of the map. It does not even guarantee that the order will remain constant over time. PHP arrays are order map. The corresponding class for Java is probably the LinkedHasMap.
31st Mar 2017, 1:24 PM
Tashi N
Tashi N - avatar