Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to convert int to integer in java

// new Integer(i) is deprecated in java
//therefore you can use the below mentioned technique
int iInt = 10;
Integer iInteger = Integer.valueOf(iInt);
Comment

how to convert primitive int to Integer in java

public class IntToIntegerExample {
  	public static void main(String[] args) {
    int i = 10;    
    Integer intObj = new Integer(i);
    System.out.println(intObj);
  }
}
Comment

PREVIOUS NEXT
Code Example
Java :: this in java 
Java :: list of numbers java 
Java :: java files 
Java :: Cause: zip END header not found 
Java :: statusbar text color android 
Java :: java running sum of array 
Java :: simple java code 
Java :: mockito mock void methods 
Java :: initialiser une arraylist 
Java :: java priority queue 
Java :: make edittext not editable android 
Java :: how to take float input in java 
Java :: setupactionbarwithnavcontroller problem 
Java :: java stream loop 
Java :: hollow pyramid star pattern in java 
Java :: different types of variables in java 
Java :: loop through java object 
Java :: android textview center align text programmatically 
Java :: define an array of size n in java 
Java :: array contain java 
Java :: set layout params in dp value 
Java :: java string literals 
Java :: java map merge example 
Java :: java arrayList of array to array of array 
Java :: Convert Strings To Mathematical Expressions In java 
Java :: java iterator index 
Java :: swing getsource 
Java :: compareto in java string 
Java :: largest number in an array in java 
Java :: java super keyword 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =