All Date Type Conversions in Java with Examples

All Date Type Conversions in Java with Examples: This article “All Date Type Conversions in Java with Examples” we are writing to help people to quickly find the data type conversions in java with examples. Few of the below conversions are many times asked in interviews also. So bookmark and read often to store it in your mind.   Array […]

 2,034 total views

» Read more

Converting String Array to Integer Array Example Java

Java Program to Convert String Array to Integer Array: In this below program we have converted string array to integer array. package in.javadomain; public class StringArrayToIntArray { public static void main(String[] args) { String[] strArray = { "10", "20", "30", "40", "50" }; int[] intArray = new int[strArray.length]; for (int i = 0; i < strArray.length; i++) { intArray[i] = […]

 1,583 total views

» Read more

Int array vs Integer array in java

Int array vs Integer array in java: Both int array and integer array is sameĀ in terms of holding the value/assigning the value. But int[] array can store only primitive data types, where as Integer[] array can store objects also. Also only Integer[] array can store “null”.   Int Array: Int array to store primitive data type (int) values. but now […]

 1,348 total views

» Read more

[Clearly explained] int Vs Integer

int(primitive data type) and Integer (wrapper class object): 1. It is not possible to assign null (no value) to int. But the same possible in Integer. Eg: Integer a = null; // Possible int ab = null; //Not Possible   2. In collections we can able to use Integer for HashMap (key) or vector(Integer) or ArrayList(Integer), int cannot be used […]

 1,090 total views

» Read more