About 51 results
Open links in new tab
  1. How do I declare and initialize an array in Java? - Stack Overflow

    Jul 29, 2009 · You can either use array declaration or array literal (but only when you declare and affect the variable right away, array literals cannot be used for re-assigning an array). For primitive types:

  2. What is the difference between Integer and int in Java?

    Java automatically casts between the two; from Integer to int whenever the Integer object occurs as an argument to an int operator or is assigned to an int variable, or an int value is assigned to an Integer …

  3. java - What does a method with (int [] []) mean? - Stack Overflow

    Jun 17, 2015 · In Java, " int [ ] [ ] " stands for a 2-dimensional integer array. To make it easy to understand, simply we can compare 2-d integer array with a simple 1-d integer array;

  4. java - Diferencia entre int [] e Integer - Stack Overflow en español

    Buenas, me gustaría saber cual es la diferencia entre declarar int[] vector o declarar Integer[] vector. En un ejercicio de clase se ha declarado de ambas formas y no se cual es exactamente la

  5. 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. Another …

  6. java - Using int vs Integer - Stack Overflow

    Java Int vs Integer However, very different things are going on under the covers here. An int is a number; an > Integer is a pointer that can reference an object that contains a number. ... An int is not …

  7. Java - Convert integer to string - Stack Overflow

    int i = 1234; String str = Integer.toString(i); Returns a String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if …

  8. integer - The range of int in Java - Stack Overflow

    I understand that the int range in Java should be -2^31 to 2^31-1. But when I run this code snippet with 20: public class Factorial { public int factorial(int n) { int fac=1; fo...

  9. How do I convert a String to an int in Java? - Stack Overflow

    Sadly, the standard Java methods Integer::parseInt and Integer::valueOf throw a NumberFormatException to signal this special case. Thus, you have to use exceptions for flow …

  10. What is ++int in Java? - Stack Overflow

    Possible Duplicate: explain working of post and pre increment operator in Java What is the difference between int++ and ++int? In Java, what is ++int? What does it do? What does it mean? (So...