Menu

[r805]: / trunk / php-java-bridge / tests.php5 / sequence_dictionary.php  Maximize  Restore  History

Download this file

14 lines (10 with data), 506 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/php
<?php
require_once ("java/Java.inc");
$ar=array(1, 2, 3, "X"=>5, "X"=>99, 7, 11, -13, -17.01, 19);
$ar2=array(1, 2, 3, 5, 7, 1000=>23, 6=>11, 7=>-13, 8=>-17.01, 9=>19);
echo "Set : " . java_cast(new java("java.util.Vector", $ar),"S") ."\n";
echo "Ordered : " . java_cast(new java("java.util.Vector", $ar2),"S") ."\n";
echo "Dictionary: " . java_cast(new java("java.util.HashMap", $ar),"S") ."\n";
echo "Dictionary: " . java_cast(new java("java.util.HashMap", $ar2),"S") ."\n";
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.