Java Integer.valueOf(String s)

Syntax

Integer.valueOf(String s) has the following syntax.

public static Integer valueOf(String s)   throws NumberFormatException

Example

In the following code shows how to use Integer.valueOf(String s) method.


/*  ww w .j ava2s .  c om*/
public class Main{
   public static void main(String[] args) {
     System.out.println(Integer.valueOf("100"));
   }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable