
Loading ...
320 views
11.17.2008 by HappyFace in
Java
An example how to parse a String to an int
JAVA:
-
package basic;
-
-
public class StringToInt {
-
public static void main
(String[] args
){
-
-
-
int result =
Integer.
parseInt(numberStrOne
) +
Integer.
parseInt(numberStrTwo
);
-
System.
out.
println("The result is " + result
);
-
}
-
}
The output will be:
The result is 381
Bookmark this page:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Related posts
- December 29, 2008 -- New java challenges! (0)
- December 27, 2008 -- Java games at java4k, maximum fun, minimum size (0)
- December 24, 2008 -- Left 4 Dead Java version (0)
- December 22, 2008 -- Send and recieve images through network using java #2 (0)
- November 24, 2008 -- Eating monsters problem (0)
- November 17, 2008 -- [Java] Call a method from another class (0)
- October 28, 2008 -- Get the rgb value of an image in java (0)
- October 28, 2008 -- Java stars (0)
- September 17, 2008 -- Online Java compiler W.I.P. (1)
- August 21, 2008 -- Java compiler API, compiling made easy (1)