Tagged Questions
51
votes
14answers
43k views
Java associative-array
How to create and fetch associative array in Java, like this in php?
$arr[0]['name'] = 'demo';
$arr[0]['fname'] = 'fdemo';
$arr[1]['name'] = 'test';
$arr[1]['fname'] = 'fname';
6
votes
8answers
8k views
java and python equivalent of php's foreach($array as $key => $value)
In php, one can handle a list of state names and their abbreviations with an associative array like this:
<?php
$stateArray = array(
"ALABAMA"=>"AL",
"ALASKA"=>"AK",
...
13
votes
6answers
7k views
Automatically sorted by values map in Java
I need to have an automatically sorted-by-values map in Java - so that It keeps being sorted at any time while I'm adding new key-value pairs or update the value of an existing key-value pair, or even ...
3
votes
1answer
2k views
Creating package-level associative array in java
Is it possible to create a java representation of a package-level oracle associative array. For example, given the following:
CREATE OR REPLACE PACKAGE MyPackage AS
TYPE t_numbers IS TABLE OF ...