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

    Jul 29, 2009 · This answer fails to properly address the question: "How do I declare and initialize an array in Java?" Other answers here show that it is simple to initialize float and int arrays …

  2. java - Multidimensional arrays on Oracle Tutorials - Stack Overflow

    Feb 6, 2012 · I am going through the Oracle tutorials on Java and there is one thing I do not understand so far. This is why the outcome of the arrays is what is shown. The code is: public …

  3. java - How can I check whether an array is null / empty? - Stack …

    I have an int array which has no elements and I'm trying to check whether it's empty. For example, why is the condition of the if-statement in the code below never true? int[] k = new int[3]; if...

  4. How to get first and last element in an array in java?

    Both approaches allow you to retrieve the first and last elements of an array in Java. Choose the one that best fits your needs and the type of data structure you are working with.

  5. bluej - Simple Java Array Newbie - Stack Overflow

    Mar 5, 2013 · Perhaps you should start with the Java Tutorial. I'd recommend starting at the beginning, but there's a section on arrays as well.

  6. java - How do you call upon an array - Stack Overflow

    Nov 26, 2012 · Sure, you'd just access the index you want and set it. You should probably read the Java Arrays tutorial, it'll go over the basics for you.

  7. java - Array of abstract class - Stack Overflow

    Oct 11, 2013 · - An Abstract class is one whose instance CANNOT be created. - Creating an Array which holds the Object Reference Variable of that Abstract class are just the references …

  8. java - How do I reverse a String array? - Stack Overflow

    Nov 7, 2014 · A for loop upto (array.length)/2, a temp String variable and 3 assignment operations will do it for you :)

  9. Using JSON.Simple with nested objects and arrays

    Jul 19, 2014 · I've decided on using JSON.Simple to parse Java in my application, as apposed to GSON or Jackson, because both of them seem over complicated for my needs and appeared …

  10. initializing a boolean array in java - Stack Overflow

    Mar 2, 2010 · In Java arrays are created on heap and every element of the array is given a default value depending on its type. For boolean data type the default value is false.