About 1,590,000 results
Open links in new tab
  1. java - Long vs Integer, long vs int, what to use and when? - Stack …

    May 2, 2011 · Java.util.collections methods usually use the boxed (Object -wrapped) versions, because they need to work for any Object, and a primitive type, like int or long, is not an Object.

  2. Java's L number (long) specification - Stack Overflow

    By default any integral primitive data type (byte, short, int, long) will be treated as int type by java compiler. For byte and short, as long as value assigned to them is in their range, there is no …

  3. Initialize a long in Java - Stack Overflow

    Primitive Data Types - oracle doc says the range of long in Java is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. But when I do something like this in my ...

  4. How to use long data type in Java? - Stack Overflow

    Nov 19, 2015 · Closed 12 years ago. I have to use quite a big number - 600851475143; as we all know, I have to use long data type but when I try to initialize like: long number = …

  5. Java Long primitive type maximum limit - Stack Overflow

    I am using the long primitive type which increments by 1 whenever my generateNumber method is called. What happens if long reaches its maximum value? Will it throw any exception or will it …

  6. type conversion - Long Literals in Java - Stack Overflow

    May 18, 2018 · long x = 100 ; // 32-bit `int` integer primitive being stored in a 64-bit `long` integer primitive. The extra 32-bits are filled in with zeros automatically by Java. As noted in a …

  7. What is the difference between "long", "long long", "long int", and ...

    Sep 24, 2013 · I am transitioning from Java to C++ and have some questions about the long data type. In Java, to hold an integer greater than 232, you would simply write long x;. However, in …

  8. What is the Data Type Length in Java - Stack Overflow

    Apr 24, 2017 · In Java SE 8 and later, you can use the long data type to represent an unsigned 64-bit long, which has a minimum value of 0 and a maximum value of 264-1. Use this data …

  9. How to check a Long for null in java - Stack Overflow

    Oct 29, 2014 · 21 If it is Long object then You can use longValue == null or you can use Objects.isNull(longValue) method in Java 7+ projects . Please check for more info.

  10. Java equivalent of unsigned long long? - Stack Overflow

    Nov 17, 2014 · In C++, I enjoyed having access to a 64 bit unsigned integer, via unsigned long long int, or via uint64_t. Now, in Java longs are 64 bits, I know. However, they are signed. Is …