Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Integer Constructor (Int32)

Visual Studio 2005

Constructs an Integer object that represents the integer passed as a parameter.

Package: java.lang

Assembly: vjslib (in vjslib.dll)


public java.lang.Integer(
    int value);

Parameters

value

Expression of the type int.

This example creates an instance of the Integer class and initializes it with the value 123.

// Integer1.jsl
// Integer constructor example

public class MyClass
{
    public static void main(String[] args)
    {
        Integer i = new Integer(123);

        System.out.print("The integer number is: "+ i);
    }
}

/*
Output:
The integer number is: 123
*/
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.