Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

long vs int java

An int is a 32-bit integer; a long is a 64-bit integer. Which one to use depends on how large the numbers are that you expect to work with.

int and long are primitive types, while Integer and Long are objects. 
  
  Primitive types are more efficient, but sometimes you need to use objects;
for example, Java's collection classes can only work with objects, 
so if you need a list of integers you have to make it a List<Integer>, for example (you can't use int in a List directly).
Comment

PREVIOUS NEXT
Code Example
Java :: Send image file to server useing Retrofit 
Java :: java switch case 
Java :: fill two dimensional array row by row java 
Java :: java array initialization 
Java :: android application class 
Java :: java call method from another class example 
Java :: spring boot jackson infinite recursion 
Java :: java unit test an api 
Java :: load a list from text file java 
Java :: iterate through an arraylist java 
Java :: from date to string 
Java :: java try and catch 
Java :: fragment to fragment 
Java :: how to initialize array in java with 0 
Java :: can interface have attributes java 
Java :: this keyword in java 
Java :: how to take max value from priority queue in java 
Java :: java inline conditional 
Java :: como ordenar un arraylist alfabeticamente en java 
Java :: java wait for user input 
Java :: java interfce 
Java :: java url 
Java :: Caused by: java.lang.ClassNotFoundException 
Java :: hexstring to string In java 
Java :: write in text file android studio 
Java :: kubectl config kubernetes dashboard 
Java :: first character string number java 
Java :: Java Longest String In String Array 
Java :: generate uuid from string 
Java :: loop through number java 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =