Online Java Compiler By
JavaTpoint.com
public class IntegerValueOfExample1 { @SuppressWarnings("static-access") public static void main(String[] args) { Integer a = 35; Integer b = -45; //It returns a Integer instance representing the specified int value System.out.println("Value = " + a.valueOf(2)); System.out.println("Value = " + b.valueOf(-5)); } }
Output