[5800] in java-interest
Re:Getting_numbers...
daemon@ATHENA.MIT.EDU (Vitor Carreira)
Tue Feb 27 01:58:15 1996
Date: Tue, 27 Feb 1996 07:26:56 +0100
From: Vitor Carreira <vmc@lila.dei.uc.pt>
To: java-interest@java.sun.com
Dave DeMaagd wrote:
> How do I get a number from the <param...> tag, it seems that I can only =
> get strings. Do I have to get it as a string and then convert it to a =
> integer. If so, how do I convert a string to an integer.
To convert a string to an int do this:
String st;
int num;
try {
number=(new Integer(st).intValue();
} catch (NumberFormatException e) {
not integer format
}
See the java.lang API for more information.
---------------
Vitor Carreira
vmc@lila.dei.uc.pt
~
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com