java.lang.Integer.valueOf(String s)


java.lang.Integer.valueOf(String s)

package com.codingdict;



import java.lang.*;



public class IntegerDemo {



   public static void main(String[] args) {



      Integer i = new Integer(30);



      String str = "5";

      // returns a Integer instance representing the specified string

      System.out.println("Value = " + i.valueOf(str));

   }

}