in reply to Re^4: Shortcutting namespaces in Inline::Java
in thread Shortcutting namespaces in Inline::Java
use Inline Java => <<'END', AUTOSTUDY => 1 ; import java.util.* ; class Pod_10 { public Pod_10(){ } public HashMap get_hm(){ HashMap hm = new HashMap() ; return hm ; } } END my $obj = new Pod_10() ; my $hm = $obj->get_hm() ; $hm->put("key", "value") ; my $val = $hm->get("key") ; print($val . "\n") ; # prints value
^M Free your mind!
Key to hats: ^I=white ^B=black ^P=yellow ^E=red ^C=green ^M=blue - see Moron's scratchpad for fuller explanation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Shortcutting namespaces in Inline::Java
by suaveant (Parson) on Apr 24, 2007 at 20:58 UTC |