Example usage for java.lang Integer Integer

List of usage examples for java.lang Integer Integer

Introduction

In this page you can find the example usage for java.lang Integer Integer.

Prototype

@Deprecated(since = "9")
public Integer(String s) throws NumberFormatException 

Source Link

Document

Constructs a newly allocated Integer object that represents the int value indicated by the String parameter.

Usage

From source file:Wrap.java

public static void main(String args[]) {

    Integer iOb = new Integer(100);

    int i = iOb.intValue();

    System.out.println(i + " " + iOb); // displays 100 100
}

From source file:Main.java

public static void main(String[] args) {
    Integer intObj1 = new Integer(10);
    System.out.println(intObj1);
}

From source file:Main.java

public static void main(String[] args) {
    Integer intObj1 = new Integer(10);
    Integer intObj2 = new Integer("10");
    System.out.println(intObj1);/*www. jav a  2s.  c om*/
    System.out.println(intObj2);
}

From source file:MainClass.java

public static void main(String[] args) {
    Integer n1 = new Integer(47);
    Integer n2 = new Integer(47);
    System.out.println(n1 == n2);
    System.out.println(n1 != n2);
}

From source file:Main.java

public static void main(String[] args) {
    Integer x = new Integer(50);
    Float y = new Float(50f);

    System.out.println(x.equals(y));
    System.out.println(x.equals(50));

}

From source file:MainClass.java

public static void main(String[] args) {
    Integer n1 = new Integer(47);
    Integer n2 = new Integer(47);
    System.out.println(n1.equals(n2));
}

From source file:Main.java

public static void main(String[] args) {

    Integer intObject = new Integer(999);
    System.out.println(intObject.hashCode());
}

From source file:Main.java

public static void main(String[] args) {
    Integer intObj = new Integer(10);

    String str = intObj.toString();
    System.out.println("Integer converted to String as " + str);
}

From source file:Main.java

public static void main(String[] args) {

    Integer intObject = new Integer(999);
    System.out.println(intObject.toString());
}

From source file:MainClass.java

public static void main(String args[]) {
    Integer iOb = new Integer(100);

    int i = iOb.intValue();

    System.out.println(i);/* w  ww  .ja v a 2 s .  c  o m*/
}