Menu

[r966]: / branches / Release-5-5-4-1 / php-java-bridge / tests.php5 / numberTest.php  Maximize  Restore  History

Download this file

20 lines (15 with data), 722 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/php
<?php
require_once ("java/Java.inc");
$here=realpath(dirname($_SERVER["SCRIPT_FILENAME"]));
if(!$here) $here=getcwd();
java_require("$here/numberTest.jar");
$test = new java('NumberTest');
print "getInteger() = "; echo($test->getInteger()); echo "<br>\n";
print "getPrimitiveInt() = "; echo($test->getPrimitiveInt()); echo "<br>\n";
print "getFloat() = "; echo($test->getFloat()); echo "<br>\n";
print "getPrimitiveFloat() = "; echo($test->getPrimitiveFloat()); echo "<br>\n";
print "getDouble() = "; echo($test->getDouble()); echo "<br>\n";
print "getPrimitiveDouble() = "; echo($test->getPrimitiveDouble()); echo "<br>\n";
print "getBigDecimal() = "; echo($test->getBigDecimal()); echo "<br>\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.